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

Side by Side Diff: content/shell/browser/shell_devtools_manager_delegate.cc

Issue 803813003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell_devtools_manager_delegate.h" 5 #include "content/shell/browser/shell_devtools_manager_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return scoped_ptr<net::ServerSocket>( 76 return scoped_ptr<net::ServerSocket>(
77 new net::TCPServerSocket(NULL, net::NetLog::Source())); 77 new net::TCPServerSocket(NULL, net::NetLog::Source()));
78 } 78 }
79 79
80 DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory); 80 DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
81 }; 81 };
82 #endif 82 #endif
83 83
84 scoped_ptr<DevToolsHttpHandler::ServerSocketFactory> 84 scoped_ptr<DevToolsHttpHandler::ServerSocketFactory>
85 CreateSocketFactory() { 85 CreateSocketFactory() {
86 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 86 const base::CommandLine& command_line =
87 *base::CommandLine::ForCurrentProcess();
87 #if defined(OS_ANDROID) 88 #if defined(OS_ANDROID)
88 std::string socket_name = "content_shell_devtools_remote"; 89 std::string socket_name = "content_shell_devtools_remote";
89 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) { 90 if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) {
90 socket_name = command_line.GetSwitchValueASCII( 91 socket_name = command_line.GetSwitchValueASCII(
91 switches::kRemoteDebuggingSocketName); 92 switches::kRemoteDebuggingSocketName);
92 } 93 }
93 return scoped_ptr<DevToolsHttpHandler::ServerSocketFactory>( 94 return scoped_ptr<DevToolsHttpHandler::ServerSocketFactory>(
94 new UnixDomainServerSocketFactory(socket_name)); 95 new UnixDomainServerSocketFactory(socket_name));
95 #else 96 #else
96 // See if the user specified a port on the command line (useful for 97 // See if the user specified a port on the command line (useful for
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 271
271 void ShellDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) { 272 void ShellDevToolsManagerDelegate::EnumerateTargets(TargetCallback callback) {
272 TargetList targets; 273 TargetList targets;
273 for (const auto& agent_host : DevToolsAgentHost::GetOrCreateAll()) { 274 for (const auto& agent_host : DevToolsAgentHost::GetOrCreateAll()) {
274 targets.push_back(new Target(agent_host)); 275 targets.push_back(new Target(agent_host));
275 } 276 }
276 callback.Run(targets); 277 callback.Run(targets);
277 } 278 }
278 279
279 } // namespace content 280 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | content/shell/browser/shell_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698