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

Unified Diff: components/devtools_http_handler/devtools_http_handler.cc

Issue 2272213003: DevTools: remove devtools_discovery (merged into content). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix Created 4 years, 4 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
« no previous file with comments | « components/devtools_http_handler/DEPS ('k') | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/devtools_http_handler/devtools_http_handler.cc
diff --git a/components/devtools_http_handler/devtools_http_handler.cc b/components/devtools_http_handler/devtools_http_handler.cc
index f1bf34f9b8d7b24843900be6da56af6c8c4474d2..1c3d733531f5c60536424246030ac0742511bf4d 100644
--- a/components/devtools_http_handler/devtools_http_handler.cc
+++ b/components/devtools_http_handler/devtools_http_handler.cc
@@ -22,11 +22,11 @@
#include "base/threading/thread.h"
#include "base/values.h"
#include "build/build_config.h"
-#include "components/devtools_discovery/devtools_discovery_manager.h"
#include "components/devtools_http_handler/devtools_http_handler.h"
#include "components/devtools_http_handler/devtools_http_handler_delegate.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_external_agent_proxy_delegate.h"
+#include "content/public/browser/devtools_manager_delegate.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/user_agent.h"
#include "net/base/escape.h"
@@ -575,8 +575,7 @@ void DevToolsHttpHandler::OnJsonRequest(
if (command == "list") {
std::string host = info.headers["host"];
DevToolsAgentHost::List agent_hosts =
- devtools_discovery::DevToolsDiscoveryManager::GetInstance()->
- GetDescriptors();
+ content::DevToolsAgentHost::DiscoverAllHosts();
std::sort(agent_hosts.begin(), agent_hosts.end(), TimeComparator);
agent_host_map_.clear();
base::ListValue list_value;
@@ -594,9 +593,11 @@ void DevToolsHttpHandler::OnJsonRequest(
net::UnescapeRule::PATH_SEPARATORS));
if (!url.is_valid())
url = GURL(url::kAboutBlankURL);
- scoped_refptr<DevToolsAgentHost> agent_host =
- devtools_discovery::DevToolsDiscoveryManager::GetInstance()->CreateNew(
- url);
+ scoped_refptr<DevToolsAgentHost> agent_host = nullptr;
+ content::DevToolsManagerDelegate* delegate =
+ DevToolsAgentHost::GetDevToolsManagerDelegate();
+ if (delegate)
+ agent_host = delegate->CreateNewTarget(url);
if (!agent_host) {
SendJson(connection_id,
net::HTTP_INTERNAL_SERVER_ERROR,
« no previous file with comments | « components/devtools_http_handler/DEPS ('k') | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698