diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-18 14:20:41 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-18 14:20:41 +0000 |
commit | 4adc750800ee7ee35b27b32f3477d276bd938a93 (patch) | |
tree | 1674201fe1ce5a05e0662247a0baeda2698a5e2d | |
parent | 2d411e596bff52a720c21e3e752af79f15969ea1 (diff) | |
download | chromium_src-4adc750800ee7ee35b27b32f3477d276bd938a93.zip chromium_src-4adc750800ee7ee35b27b32f3477d276bd938a93.tar.gz chromium_src-4adc750800ee7ee35b27b32f3477d276bd938a93.tar.bz2 |
Revert r267126: "DevTools: handle Tracing.start in both browser and renderer" It was plain wrong.
TBR=caseq,yurys
BUG=374411
Review URL: https://codereview.chromium.org/288423004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271296 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/devtools/devtools_tracing_handler.cc | 12 | ||||
-rw-r--r-- | content/browser/devtools/devtools_tracing_handler.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/content/browser/devtools/devtools_tracing_handler.cc b/content/browser/devtools/devtools_tracing_handler.cc index 977f88e..5e97b1b 100644 --- a/content/browser/devtools/devtools_tracing_handler.cc +++ b/content/browser/devtools/devtools_tracing_handler.cc @@ -169,9 +169,17 @@ DevToolsTracingHandler::OnStart( } TracingController::GetInstance()->EnableRecording( - categories, options, TracingController::EnableRecordingDoneCallback()); + categories, options, + base::Bind(&DevToolsTracingHandler::OnTracingStarted, + weak_factory_.GetWeakPtr(), + command)); - return command->SuccessResponse(NULL); + return command->AsyncResponsePromise(); +} + +void DevToolsTracingHandler::OnTracingStarted( + scoped_refptr<DevToolsProtocol::Command> command) { + SendAsyncResponse(command->SuccessResponse(NULL)); } void DevToolsTracingHandler::OnBufferUsage(float usage) { diff --git a/content/browser/devtools/devtools_tracing_handler.h b/content/browser/devtools/devtools_tracing_handler.h index 1d0c543..3879d39 100644 --- a/content/browser/devtools/devtools_tracing_handler.h +++ b/content/browser/devtools/devtools_tracing_handler.h @@ -27,6 +27,7 @@ class DevToolsTracingHandler : public DevToolsProtocol::Handler { void BeginReadingRecordingResult(const base::FilePath& path); void ReadRecordingResult(const scoped_refptr<base::RefCountedString>& result); void OnTraceDataCollected(const std::string& trace_fragment); + void OnTracingStarted(scoped_refptr<DevToolsProtocol::Command> command); void OnBufferUsage(float usage); scoped_refptr<DevToolsProtocol::Response> OnStart( |