summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 21:14:00 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-10 21:14:00 +0000
commite5f3d890194d0c8b02b7bd1d9cecbe4fafc648a4 (patch)
tree790568fd930dd50fc111d06c5feab8b77644daf0 /remoting/host
parent12180f88e55c3d3057187131cc5b62365ba67127 (diff)
downloadchromium_src-e5f3d890194d0c8b02b7bd1d9cecbe4fafc648a4.zip
chromium_src-e5f3d890194d0c8b02b7bd1d9cecbe4fafc648a4.tar.gz
chromium_src-e5f3d890194d0c8b02b7bd1d9cecbe4fafc648a4.tar.bz2
Always use google_apis to get the client ID.
BUG=150042 Review URL: https://chromiumcodereview.appspot.com/11087057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/host_config.cc2
-rw-r--r--remoting/host/host_config.h2
-rw-r--r--remoting/host/remoting_me2me_host.cc28
-rw-r--r--remoting/host/setup/host_starter.cc1
4 files changed, 2 insertions, 31 deletions
diff --git a/remoting/host/host_config.cc b/remoting/host/host_config.cc
index 869995f..96053e6 100644
--- a/remoting/host/host_config.cc
+++ b/remoting/host/host_config.cc
@@ -10,8 +10,6 @@ const char kHostEnabledConfigPath[] = "enabled";
const char kXmppLoginConfigPath[] = "xmpp_login";
const char kXmppAuthTokenConfigPath[] = "xmpp_auth_token";
const char kOAuthRefreshTokenConfigPath[] = "oauth_refresh_token";
-const char kOAuthUseOfficialClientIdConfigPath[] =
- "oauth_use_official_client_id";
const char kXmppAuthServiceConfigPath[] = "xmpp_auth_service";
const char kHostIdConfigPath[] = "host_id";
const char kHostNameConfigPath[] = "host_name";
diff --git a/remoting/host/host_config.h b/remoting/host/host_config.h
index ec8162c..e7d95f1 100644
--- a/remoting/host/host_config.h
+++ b/remoting/host/host_config.h
@@ -25,8 +25,6 @@ extern const char kXmppLoginConfigPath[];
extern const char kXmppAuthTokenConfigPath[];
// OAuth refresh token used to fetch an access token for the XMPP network.
extern const char kOAuthRefreshTokenConfigPath[];
-// Flag to indicate whether the official client ID should be used.
-extern const char kOAuthUseOfficialClientIdConfigPath[];
// Auth service used to authenticate to XMPP network.
extern const char kXmppAuthServiceConfigPath[];
// Unique identifier of the host used to register the host in directory.
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index e012ff6..55bf298 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -119,11 +119,6 @@ class HostProcess
explicit HostProcess(scoped_ptr<ChromotingHostContext> context)
: context_(context.Pass()),
config_(FilePath()),
-#ifdef OFFICIAL_BUILD
- oauth_use_official_client_id_(true),
-#else
- oauth_use_official_client_id_(false),
-#endif
allow_nat_traversal_(true),
restarting_(false),
shutting_down_(false),
@@ -378,13 +373,6 @@ class HostProcess
return false;
}
- // It is okay to not have this value and we will use the default value
- // depending on whether this is an official build or not.
- // If the client-Id type to use is not specified we default based on
- // the build type.
- config_.GetBoolean(kOAuthUseOfficialClientIdConfigPath,
- &oauth_use_official_client_id_);
-
if (!oauth_refresh_token_.empty()) {
xmpp_auth_token_ = ""; // This will be set to the access token later.
xmpp_auth_service_ = "oauth2";
@@ -523,21 +511,10 @@ class HostProcess
if (!oauth_refresh_token_.empty()) {
OAuthClientInfo client_info = {
- kUnofficialOAuth2ClientId,
- kUnofficialOAuth2ClientSecret
+ google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING),
+ google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING)
};
-#ifdef OFFICIAL_BUILD
- if (oauth_use_official_client_id_) {
- OAuthClientInfo official_client_info = {
- google_apis::GetOAuth2ClientID(google_apis::CLIENT_REMOTING),
- google_apis::GetOAuth2ClientSecret(google_apis::CLIENT_REMOTING)
- };
-
- client_info = official_client_info;
- }
-#endif // OFFICIAL_BUILD
-
scoped_ptr<SignalingConnector::OAuthCredentials> oauth_credentials(
new SignalingConnector::OAuthCredentials(
xmpp_login_, oauth_refresh_token_, client_info));
@@ -690,7 +667,6 @@ class HostProcess
std::string xmpp_auth_service_;
std::string oauth_refresh_token_;
- bool oauth_use_official_client_id_;
scoped_ptr<policy_hack::PolicyWatcher> policy_watcher_;
bool allow_nat_traversal_;
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc
index cb631dc..31847fe 100644
--- a/remoting/host/setup/host_starter.cc
+++ b/remoting/host/setup/host_starter.cc
@@ -137,7 +137,6 @@ void HostStarter::OnHostRegistered() {
scoped_ptr<base::DictionaryValue> config(new base::DictionaryValue());
config->SetString("xmpp_login", user_email_);
config->SetString("oauth_refresh_token", refresh_token_);
- config->SetBoolean("oauth_use_official_client_id", true);
config->SetString("host_id", host_id_);
config->SetString("host_name", host_name_);
config->SetString("private_key", key_pair_.GetAsString());