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(); |
} |