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

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

Issue 2833213002: DevTools: retain DTAH in all the targets to match their life time. (Closed)
Patch Set: Created 3 years, 8 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_agent_host_impl.cc
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index a23f00b5667a78b75d9b899a6b6392ed057bb703..31272ba24f619b893598b6475abb8c7a675363e7 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -83,10 +83,11 @@ DevToolsAgentHost::List DevToolsAgentHost::GetOrCreateAll() {
}
// static
-void DevToolsAgentHost::DiscoverAllHosts(const DiscoveryCallback& callback) {
+DevToolsAgentHost::List DevToolsAgentHost::DiscoverAllHosts() {
dgozman 2017/04/22 00:00:45 Inline this method to http handler.
DevToolsManager* manager = DevToolsManager::GetInstance();
- if (!manager->delegate() || !manager->delegate()->DiscoverTargets(callback))
- callback.Run(DevToolsAgentHost::GetOrCreateAll());
+ if (!manager->delegate() || !manager->delegate()->CanDiscoverTargets())
+ return DevToolsAgentHost::GetOrCreateAll();
+ return manager->delegate()->DiscoverTargets();
dgozman 2017/04/22 00:00:45 DiscoverTargetsAvailableRemotely
}
// Called on the UI thread.

Powered by Google App Engine
This is Rietveld 408576698