tracing: get rid of files in TracingController interface
commitb85bb8fc41a192f207fa2361a8edcfa42b47076f
authorcaseq <caseq@chromium.org>
Mon, 15 Sep 2014 10:50:10 +0000 (15 03:50 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 15 Sep 2014 10:53:18 +0000 (15 10:53 +0000)
treeb842758c9e5ecea86c2775d2f5d7b976dd146552
parentad03444a481cf5618dcf40b9449b7ace8fee15e7
tracing: get rid of files in TracingController interface

The only way to get the tracing data used to be by reading the file
provided in TracingController::DisableTracing() interface. This does
not fit well for most usages, so this introduces a TraceDataSink
interface that is backed either by a file, string, or, in case of
DevTools, by the protocol client.

This resolves the OOM in browser and imporves performance while
recording very large traces through DevTools, streamlines
TracingController core and reduces coplexity of code for most
TracingController clients.

BUG=409733,361045

Review URL: https://codereview.chromium.org/541763002

Cr-Commit-Position: refs/heads/master@{#294801}
14 files changed:
chrome/test/base/tracing.cc
components/feedback/tracing_manager.cc
components/feedback/tracing_manager.h
content/browser/android/tracing_controller_android.cc
content/browser/android/tracing_controller_android.h
content/browser/browser_main_loop.cc
content/browser/devtools/devtools_tracing_handler.cc
content/browser/devtools/devtools_tracing_handler.h
content/browser/tracing/tracing_controller_browsertest.cc
content/browser/tracing/tracing_controller_impl.cc
content/browser/tracing/tracing_controller_impl.h
content/browser/tracing/tracing_ui.cc
content/public/browser/tracing_controller.h
content/public/test/browser_test_base.cc