Commit a6e6da20 authored by mnaganov@chromium.org's avatar mnaganov@chromium.org

Make both DevToolsServer constructors to be equivalent

We are moving away from using the prefixless constructor in
Chrome for Android code. We need to make sure that both
versions of the constructor respect kRemoteDebuggingSocketName flag.

BUG=263735
R=bulach@chromium.org

Review URL: https://codereview.chromium.org/23458029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222163 0039d316-1c4b-4281-b951-d872f2087c98
parent 8c5d6c02
...@@ -148,6 +148,12 @@ DevToolsServer::DevToolsServer(const std::string& socket_name_prefix) ...@@ -148,6 +148,12 @@ DevToolsServer::DevToolsServer(const std::string& socket_name_prefix)
: socket_name_(base::StringPrintf(kDevToolsChannelNameFormat, : socket_name_(base::StringPrintf(kDevToolsChannelNameFormat,
socket_name_prefix.c_str())), socket_name_prefix.c_str())),
protocol_handler_(NULL) { protocol_handler_(NULL) {
// Override the socket name if one is specified on the command line.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kRemoteDebuggingSocketName)) {
socket_name_ = command_line.GetSwitchValueASCII(
switches::kRemoteDebuggingSocketName);
}
} }
DevToolsServer::~DevToolsServer() { DevToolsServer::~DevToolsServer() {
......
...@@ -16,6 +16,8 @@ class DevToolsHttpHandler; ...@@ -16,6 +16,8 @@ class DevToolsHttpHandler;
// This class controls Developer Tools remote debugging server. // This class controls Developer Tools remote debugging server.
class DevToolsServer { class DevToolsServer {
public: public:
// TODO(mnaganov): Remove the prefixless constructor after having its
// usage removed in the Chrome for Android code.
DevToolsServer(); DevToolsServer();
explicit DevToolsServer(const std::string& socket_name_prefix); explicit DevToolsServer(const std::string& socket_name_prefix);
~DevToolsServer(); ~DevToolsServer();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment