Skip to content

Commit

Permalink
remoting: Add host name for One Platform API endpoint.
Browse files Browse the repository at this point in the history
Change-Id: If6fb006933488778f47846cdcac1a2c239a856f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1576279
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653073}
  • Loading branch information
Erik Jensen authored and Commit Bot committed Apr 23, 2019
1 parent e2a9eed commit 29e17ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion remoting/base/service_urls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ constexpr char kXmppServerAddressForMe2MeHost[] = "talk.google.com:5222";
constexpr bool kXmppServerUseTls = true;
constexpr char kGcdJid[] = "clouddevices.gserviceaccount.com";
constexpr char kFtlServerEndpoint[] = "instantmessaging-pa.googleapis.com";
constexpr char kRemotingServerEndpoint[] = "remotedesktop-pa.googleapis.com";

// Command line switches.
#if !defined(NDEBUG)
Expand All @@ -27,6 +28,7 @@ constexpr char kXmppServerDisableTlsSwitch[] = "disable-xmpp-server-tls";
constexpr char kDirectoryBotJidSwitch[] = "directory-bot-jid";
constexpr char kGcdJidSwitch[] = "gcd-jid";
constexpr char kFtlServerEndpointSwitch[] = "ftl-server-endpoint";
constexpr char kRemotingServerEndpointSwitch[] = "remoting-server-endpoint";
#endif // !defined(NDEBUG)

// Non-configurable service paths.
Expand All @@ -43,7 +45,8 @@ ServiceUrls::ServiceUrls()
xmpp_server_use_tls_(kXmppServerUseTls),
directory_bot_jid_(kRemotingBotJid),
gcd_jid_(kGcdJid),
ftl_server_endpoint_(kFtlServerEndpoint) {
ftl_server_endpoint_(kFtlServerEndpoint),
remoting_server_endpoint_(kRemotingServerEndpoint) {
#if !defined(NDEBUG)
// The command line may not be initialized when running as a PNaCl plugin.
if (base::CommandLine::InitializedForCurrentProcess()) {
Expand Down Expand Up @@ -76,6 +79,10 @@ ServiceUrls::ServiceUrls()
ftl_server_endpoint_ =
command_line->GetSwitchValueASCII(kFtlServerEndpointSwitch);
}
if (command_line->HasSwitch(kRemotingServerEndpointSwitch)) {
remoting_server_endpoint_ =
command_line->GetSwitchValueASCII(kRemotingServerEndpointSwitch);
}
}
#endif // !defined(NDEBUG)

Expand Down
5 changes: 5 additions & 0 deletions remoting/base/service_urls.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class ServiceUrls {
return ftl_server_endpoint_;
}

const std::string& remoting_server_endpoint() const {
return remoting_server_endpoint_;
}

#if !defined(NDEBUG)
// Override the directory bot JID for testing.
void set_directory_bot_jid(const std::string& bot_jid) {
Expand All @@ -72,6 +76,7 @@ class ServiceUrls {
std::string gcd_jid_;
std::string ice_config_url_;
std::string ftl_server_endpoint_;
std::string remoting_server_endpoint_;

DISALLOW_COPY_AND_ASSIGN(ServiceUrls);
};
Expand Down

0 comments on commit 29e17ed

Please sign in to comment.