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

Unified Diff: chrome/browser/android/dev_tools_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/dev_tools_server.h ('k') | chrome/browser/devtools/remote_debugging_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/dev_tools_server.cc
diff --git a/chrome/browser/android/dev_tools_server.cc b/chrome/browser/android/dev_tools_server.cc
index 96fe4735cb988ca6bf8832d4962fe8500510a68a..a1f98783ca16fc6c1c820805d62ce4cd1f4ba652 100644
--- a/chrome/browser/android/dev_tools_server.cc
+++ b/chrome/browser/android/dev_tools_server.cc
@@ -181,8 +181,7 @@ class UnixDomainServerSocketFactory
DevToolsServer::DevToolsServer(const std::string& socket_name_prefix)
: socket_name_(base::StringPrintf(kDevToolsChannelNameFormat,
- socket_name_prefix.c_str())),
- protocol_handler_(NULL) {
+ socket_name_prefix.c_str())) {
// Override the socket name if one is specified on the command line.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) {
@@ -205,20 +204,15 @@ void DevToolsServer::Start(bool allow_debug_permission) {
base::Bind(&content::CanUserConnectToDevTools);
scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory> factory(
new UnixDomainServerSocketFactory(socket_name_, auth_callback));
- protocol_handler_ = content::DevToolsHttpHandler::Start(
+ protocol_handler_.reset(content::DevToolsHttpHandler::Start(
factory.Pass(),
base::StringPrintf(kFrontEndURL, content::GetWebKitRevision().c_str()),
new DevToolsServerDelegate(auth_callback),
- base::FilePath());
+ base::FilePath()));
}
void DevToolsServer::Stop() {
- if (!protocol_handler_)
- return;
- // Note that the call to Stop() below takes care of |protocol_handler_|
- // deletion.
- protocol_handler_->Stop();
- protocol_handler_ = NULL;
+ protocol_handler_.reset();
}
bool DevToolsServer::IsStarted() const {
« no previous file with comments | « chrome/browser/android/dev_tools_server.h ('k') | chrome/browser/devtools/remote_debugging_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698