From 4adc750800ee7ee35b27b32f3477d276bd938a93 Mon Sep 17 00:00:00 2001 From: "pfeldman@chromium.org" Date: Sun, 18 May 2014 14:20:41 +0000 Subject: 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 --- content/browser/devtools/devtools_tracing_handler.cc | 12 ++++++++++-- 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 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& result); void OnTraceDataCollected(const std::string& trace_fragment); + void OnTracingStarted(scoped_refptr command); void OnBufferUsage(float usage); scoped_refptr OnStart( -- cgit v1.1