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

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

Issue 691863002: [DevTools] Remove DevToolsHttpHandler::Stop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@httpHandler
Patch Set: Removed comment Created 6 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: 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 53562759bf1ee0d8bee17594f3422d2c30bbeee4..1512ae12ce0cbe5858aa22ca22854128b27f7c58 100644
--- a/content/shell/browser/shell_browser_main_parts.cc
+++ b/content/shell/browser/shell_browser_main_parts.cc
@@ -87,10 +87,7 @@ ShellBrowserMainParts::ShellBrowserMainParts(
}
ShellBrowserMainParts::~ShellBrowserMainParts() {
- if (devtools_http_handler_) {
- // Note that Stop destroys devtools_http_handler_.
- devtools_http_handler_->Stop();
- }
+ DCHECK(!devtools_http_handler_);
}
#if !defined(OS_MACOSX)
@@ -147,9 +144,8 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
Shell::Initialize();
net::NetModule::SetResourceProvider(PlatformResourceProvider);
- // CreateHttpHandler retains ownership over DevToolsHttpHandler.
- devtools_http_handler_ =
- ShellDevToolsManagerDelegate::CreateHttpHandler(browser_context_.get());
+ devtools_http_handler_.reset(
+ ShellDevToolsManagerDelegate::CreateHttpHandler(browser_context_.get()));
InitializeMessageLoopContext();
@@ -165,11 +161,7 @@ bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
}
void ShellBrowserMainParts::PostMainMessageLoopRun() {
- if (devtools_http_handler_) {
- // Note that Stop destroys devtools_http_handler_.
- devtools_http_handler_->Stop();
- devtools_http_handler_ = nullptr;
- }
+ devtools_http_handler_.reset();
browser_context_.reset();
off_the_record_browser_context_.reset();
}
« no previous file with comments | « content/shell/browser/shell_browser_main_parts.h ('k') | extensions/shell/browser/shell_browser_main_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698