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

Unified Diff: content/shell/browser/shell_browser_main_parts.cc

Issue 2300703005: DevTools: merge devtools_http_handler into content - it is used in all the embedders anyways. (Closed)
Patch Set: for review Created 4 years, 3 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/shell/browser/shell_browser_main_parts.cc
diff --git a/content/shell/browser/shell_browser_main_parts.cc b/content/shell/browser/shell_browser_main_parts.cc
index 6ba3f0f90e7692faeca8e6f9a1d52001997bd797..feb5a153daedfbacd41b8f7dd3b116094953887a 100644
--- a/content/shell/browser/shell_browser_main_parts.cc
+++ b/content/shell/browser/shell_browser_main_parts.cc
@@ -12,8 +12,8 @@
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
-#include "components/devtools_http_handler/devtools_http_handler.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
@@ -112,12 +112,10 @@ base::StringPiece PlatformResourceProvider(int key) {
ShellBrowserMainParts::ShellBrowserMainParts(
const MainFunctionParams& parameters)
: parameters_(parameters),
- run_message_loop_(true),
- devtools_http_handler_(nullptr) {
+ run_message_loop_(true) {
}
ShellBrowserMainParts::~ShellBrowserMainParts() {
- DCHECK(!devtools_http_handler_);
#if defined(OS_ANDROID)
breakpad::CrashDumpObserver::GetInstance()->UnregisterClient(
crash_dump_manager_.get());
@@ -196,10 +194,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
new ShellGeolocationDelegate(browser_context()));
Shell::Initialize();
net::NetModule::SetResourceProvider(PlatformResourceProvider);
-
- devtools_http_handler_.reset(
- ShellDevToolsManagerDelegate::CreateHttpHandler(browser_context_.get()));
-
+ ShellDevToolsManagerDelegate::StartHttpHandler(browser_context_.get());
InitializeMessageLoopContext();
if (parameters_.ui_task) {
@@ -214,7 +209,8 @@ bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
}
void ShellBrowserMainParts::PostMainMessageLoopRun() {
- devtools_http_handler_.reset();
+ DevToolsAgentHost::StopRemoteDebuggingServer();
dgozman 2016/09/02 19:33:07 Remove this.
+ ShellDevToolsManagerDelegate::StopHttpHandler();
browser_context_.reset();
off_the_record_browser_context_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698