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

Unified Diff: components/ui_devtools/devtools_client.cc

Issue 2470933002: Disable agents when client disconnects (Closed)
Patch Set: Created 4 years, 1 month 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: components/ui_devtools/devtools_client.cc
diff --git a/components/ui_devtools/devtools_client.cc b/components/ui_devtools/devtools_client.cc
index 94a751ab6894745e7cf938869c13bf0d2fa31ad5..a7556ad774cd17ddd0047a37cacf9b3b98f8f6de 100644
--- a/components/ui_devtools/devtools_client.cc
+++ b/components/ui_devtools/devtools_client.cc
@@ -25,6 +25,12 @@ void UiDevToolsClient::AddAgent(std::unique_ptr<UiDevToolsAgent> agent) {
agents_.push_back(std::move(agent));
}
+void UiDevToolsClient::DisableAllAgents() {
+ for (std::unique_ptr<UiDevToolsAgent>& agent : agents_) {
+ agent->Disable();
+ }
sadrul 2016/11/02 01:45:39 Don't need the {}
Sarmad Hashmi 2016/11/02 02:43:53 Done.
+}
+
void UiDevToolsClient::Dispatch(const std::string& data) {
dispatcher_.dispatch(protocol::parseJSON(data));
}

Powered by Google App Engine
This is Rietveld 408576698