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

Side by Side Diff: chrome/browser/android/dev_tools_server.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/android/dev_tools_server.h" 5 #include "chrome/browser/android/dev_tools_server.h"
6 6
7 #include <pwd.h> 7 #include <pwd.h>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 DISALLOW_COPY_AND_ASSIGN(UnixDomainServerSocketFactory); 177 DISALLOW_COPY_AND_ASSIGN(UnixDomainServerSocketFactory);
178 }; 178 };
179 179
180 } // namespace 180 } // namespace
181 181
182 DevToolsServer::DevToolsServer(const std::string& socket_name_prefix) 182 DevToolsServer::DevToolsServer(const std::string& socket_name_prefix)
183 : socket_name_(base::StringPrintf(kDevToolsChannelNameFormat, 183 : socket_name_(base::StringPrintf(kDevToolsChannelNameFormat,
184 socket_name_prefix.c_str())) { 184 socket_name_prefix.c_str())) {
185 // Override the socket name if one is specified on the command line. 185 // Override the socket name if one is specified on the command line.
186 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 186 const base::CommandLine& command_line =
187 *base::CommandLine::ForCurrentProcess();
187 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) { 188 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) {
188 socket_name_ = command_line.GetSwitchValueASCII( 189 socket_name_ = command_line.GetSwitchValueASCII(
189 switches::kRemoteDebuggingSocketName); 190 switches::kRemoteDebuggingSocketName);
190 } 191 }
191 } 192 }
192 193
193 DevToolsServer::~DevToolsServer() { 194 DevToolsServer::~DevToolsServer() {
194 Stop(); 195 Stop();
195 } 196 }
196 197
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 jlong server, 247 jlong server,
247 jboolean enabled, 248 jboolean enabled,
248 jboolean allow_debug_permission) { 249 jboolean allow_debug_permission) {
249 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server); 250 DevToolsServer* devtools_server = reinterpret_cast<DevToolsServer*>(server);
250 if (enabled) { 251 if (enabled) {
251 devtools_server->Start(allow_debug_permission); 252 devtools_server->Start(allow_debug_permission);
252 } else { 253 } else {
253 devtools_server->Stop(); 254 devtools_server->Stop();
254 } 255 }
255 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698