Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1027)

Unified Diff: content/browser/devtools/devtools_tracing_handler.cc

Issue 337213005: [DevTools] Tracing handler keeps running even after devtools frontend has been closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments updated! Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « content/browser/devtools/devtools_tracing_handler.h ('k') | content/browser/devtools/render_view_devtools_agent_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698