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

Side by Side Diff: chromecast/browser/devtools/remote_debugging_server.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromecast/browser/devtools/remote_debugging_server.h" 5 #include "chromecast/browser/devtools/remote_debugging_server.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 VLOG(1) << "OnPortChanged called: old_port=" << port_ 122 VLOG(1) << "OnPortChanged called: old_port=" << port_
123 << ", new_port=" << new_port; 123 << ", new_port=" << new_port;
124 124
125 if (new_port == port_) { 125 if (new_port == port_) {
126 VLOG(1) << "Port has not been changed. Ignore silently."; 126 VLOG(1) << "Port has not been changed. Ignore silently.";
127 return; 127 return;
128 } 128 }
129 129
130 if (devtools_http_handler_) { 130 if (devtools_http_handler_) {
131 LOG(INFO) << "Stop old devtools: port=" << port_; 131 LOG(INFO) << "Stop old devtools: port=" << port_;
132 // Note: Stop destroys devtools_http_handler_. 132 devtools_http_handler_.reset();
133 devtools_http_handler_->Stop();
134 devtools_http_handler_ = NULL;
135 } 133 }
136 134
137 port_ = new_port; 135 port_ = new_port;
138 if (port_ > 0) { 136 if (port_ > 0) {
139 devtools_http_handler_ = content::DevToolsHttpHandler::Start( 137 devtools_http_handler_.reset(content::DevToolsHttpHandler::Start(
140 CreateSocketFactory(port_), 138 CreateSocketFactory(port_),
141 GetFrontendUrl(), 139 GetFrontendUrl(),
142 new CastDevToolsDelegate(), 140 new CastDevToolsDelegate(),
143 base::FilePath()); 141 base::FilePath()));
144 LOG(INFO) << "Devtools started: port=" << port_; 142 LOG(INFO) << "Devtools started: port=" << port_;
145 } 143 }
146 } 144 }
147 145
148 } // namespace shell 146 } // namespace shell
149 } // namespace chromecast 147 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/devtools/remote_debugging_server.h ('k') | content/browser/devtools/devtools_http_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698