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

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

Issue 341853002: [PowerProfiler] Power profiler service keeps running even after devtools frontend has been closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@power-profiler-devtools-crash-fix
Patch Set: Patch for landing! 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_power_handler.cc
diff --git a/content/browser/devtools/devtools_power_handler.cc b/content/browser/devtools/devtools_power_handler.cc
index 43772b47607e2dddd54bd4cab003f3f8f5716e3d..8915c03e8f1da81cbd04d1a63fae39e7a575146c 100644
--- a/content/browser/devtools/devtools_power_handler.cc
+++ b/content/browser/devtools/devtools_power_handler.cc
@@ -80,4 +80,8 @@ DevToolsPowerHandler::OnCanProfilePower(
return command->SuccessResponse(result);
}
+void DevToolsPowerHandler::OnClientDetached() {
+ PowerProfilerService::GetInstance()->RemoveObserver(this);
+}
+
} // namespace content
« no previous file with comments | « content/browser/devtools/devtools_power_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