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

Side by Side Diff: remoting/host/service_urls.cc

Issue 290173011: Cleanup: Use base::CommandLine in remoting/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 "remoting/host/service_urls.h" 5 #include "remoting/host/service_urls.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 // Configurable service data. 10 // Configurable service data.
(...skipping 15 matching lines...) Expand all
26 26
27 namespace remoting { 27 namespace remoting {
28 28
29 ServiceUrls::ServiceUrls() 29 ServiceUrls::ServiceUrls()
30 : directory_base_url_(kDirectoryBaseUrl), 30 : directory_base_url_(kDirectoryBaseUrl),
31 xmpp_server_address_(kXmppServerAddress), 31 xmpp_server_address_(kXmppServerAddress),
32 xmpp_server_use_tls_(kXmppServerUseTls), 32 xmpp_server_use_tls_(kXmppServerUseTls),
33 directory_bot_jid_(kDirectoryBotJid) { 33 directory_bot_jid_(kDirectoryBotJid) {
34 #if !defined(NDEBUG) 34 #if !defined(NDEBUG)
35 // Allow debug builds to override urls via command line. 35 // Allow debug builds to override urls via command line.
36 CommandLine* command_line = CommandLine::ForCurrentProcess(); 36 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
37 CHECK(command_line); 37 CHECK(command_line);
38 if (command_line->HasSwitch(kDirectoryBaseUrlSwitch)) { 38 if (command_line->HasSwitch(kDirectoryBaseUrlSwitch)) {
39 directory_base_url_ = command_line->GetSwitchValueASCII( 39 directory_base_url_ = command_line->GetSwitchValueASCII(
40 kDirectoryBaseUrlSwitch); 40 kDirectoryBaseUrlSwitch);
41 } 41 }
42 if (command_line->HasSwitch(kXmppServerAddressSwitch)) { 42 if (command_line->HasSwitch(kXmppServerAddressSwitch)) {
43 xmpp_server_address_ = command_line->GetSwitchValueASCII( 43 xmpp_server_address_ = command_line->GetSwitchValueASCII(
44 kXmppServerAddressSwitch); 44 kXmppServerAddressSwitch);
45 } 45 }
46 if (command_line->HasSwitch(kXmppServerDisableTlsSwitch)) { 46 if (command_line->HasSwitch(kXmppServerDisableTlsSwitch)) {
(...skipping 29 matching lines...) Expand all
76 76
77 bool ServiceUrls::xmpp_server_use_tls() const { 77 bool ServiceUrls::xmpp_server_use_tls() const {
78 return xmpp_server_use_tls_; 78 return xmpp_server_use_tls_;
79 } 79 }
80 80
81 const std::string& ServiceUrls::directory_bot_jid() const { 81 const std::string& ServiceUrls::directory_bot_jid() const {
82 return directory_bot_jid_; 82 return directory_bot_jid_;
83 } 83 }
84 84
85 } // namespace remoting 85 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/setup/daemon_controller_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698