Index: content/browser/devtools/devtools_tracing_handler.cc |
diff --git a/content/browser/devtools/devtools_tracing_handler.cc b/content/browser/devtools/devtools_tracing_handler.cc |
index b20c146eb87b28c8d191b555d484e4d1d188c0e9..19ec9769d48f65c9b2ad34e463298866743dd4e5 100644 |
--- a/content/browser/devtools/devtools_tracing_handler.cc |
+++ b/content/browser/devtools/devtools_tracing_handler.cc |
@@ -200,12 +200,21 @@ void DevToolsTracingHandler::OnBufferUsage(float usage) { |
scoped_refptr<DevToolsProtocol::Response> |
DevToolsTracingHandler::OnEnd( |
scoped_refptr<DevToolsProtocol::Command> command) { |
- buffer_usage_poll_timer_.reset(); |
- TracingController::GetInstance()->DisableRecording( |
- base::FilePath(), |
+ DisableRecording( |
base::Bind(&DevToolsTracingHandler::BeginReadingRecordingResult, |
weak_factory_.GetWeakPtr())); |
return command->SuccessResponse(NULL); |
} |
+void DevToolsTracingHandler::DisableRecording( |
+ const TracingController::TracingFileResultCallback& callback) { |
+ buffer_usage_poll_timer_.reset(); |
+ TracingController::GetInstance()->DisableRecording(base::FilePath(), |
+ callback); |
+} |
+ |
+void DevToolsTracingHandler::OnClientDetached() { |
+ DisableRecording(); |
+} |
+ |
} // namespace content |