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

Unified Diff: chrome/common/net/gaia/gaia_urls.cc

Issue 9271025: Update Gaia URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits, fix unit_tests failure and update license headers Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/net/gaia/gaia_urls.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/gaia_urls.cc
diff --git a/chrome/common/net/gaia/gaia_urls.cc b/chrome/common/net/gaia/gaia_urls.cc
index 49a33c02d5ef83df6bec5d6d3a2d68f2eee50d05..260d747677411d2b8d4325a9ba01f849e1975ca3 100644
--- a/chrome/common/net/gaia/gaia_urls.cc
+++ b/chrome/common/net/gaia/gaia_urls.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,20 +9,25 @@
namespace {
-const char kDefaultGaiaBaseUrl[] = "www.google.com";
+// Gaia service constants
+const char kDefaultGaiaBaseUrl[] = "accounts.google.com";
-const char kCaptchaUrlPrefixSuffix[] = "/accounts/";
-const char kClientLoginUrlSuffix[] = "/accounts/ClientLogin";
-const char kIssueAuthTokenUrlSuffix[] = "/accounts/IssueAuthToken";
-const char kGetUserInfoUrlSuffix[] = "/accounts/GetUserInfo";
-const char kTokenAuthUrlSuffix[] = "/accounts/TokenAuth";
-const char kMergeSessionUrlSuffix[] = "/accounts/MergeSession";
+const char kCaptchaUrlPrefixSuffix[] = "/";
+const char kClientLoginUrlSuffix[] = "/ClientLogin";
+const char kServiceLoginUrlSuffix[] = "/ServiceLogin";
+const char kIssueAuthTokenUrlSuffix[] = "/IssueAuthToken";
+const char kGetUserInfoUrlSuffix[] = "/GetUserInfo";
+const char kTokenAuthUrlSuffix[] = "/TokenAuth";
+const char kMergeSessionUrlSuffix[] = "/MergeSession";
-const char kGetOAuthTokenUrlSuffix[] = "/accounts/o8/GetOAuthToken";
-const char kOAuthGetAccessTokenUrlSuffix[] = "/accounts/OAuthGetAccessToken";
-const char kOAuthWrapBridgeUrlSuffix[] = "/accounts/OAuthWrapBridge";
-const char kOAuth1LoginUrlSuffix[] = "/accounts/OAuthLogin";
-const char kOAuthRevokeTokenUrlSuffix[] = "/accounts/AuthSubRevokeToken";
+const char kOAuthGetAccessTokenUrlSuffix[] = "/OAuthGetAccessToken";
+const char kOAuthWrapBridgeUrlSuffix[] = "/OAuthWrapBridge";
+const char kOAuth1LoginUrlSuffix[] = "/OAuthLogin";
+const char kOAuthRevokeTokenUrlSuffix[] = "/AuthSubRevokeToken";
+
+// Federated login constants
+const char kDefaultFederatedLoginBaseUrl[] = "https://www.google.com/accounts";
+const char kGetOAuthTokenUrlSuffix[] = "/o8/GetOAuthToken";
// OAuth2 client id for Google Chrome which is registered as an
// installed application.
@@ -38,6 +43,7 @@ const char kClientLoginToOAuth2Url[] =
"https://accounts.google.com/o/oauth2/programmatic_auth";
const char kOAuth2TokenUrl[] =
"https://accounts.google.com/o/oauth2/token";
+
} // namespacce
GaiaUrls* GaiaUrls::GetInstance() {
@@ -56,12 +62,16 @@ GaiaUrls::GaiaUrls() {
captcha_url_prefix_ = "http://" + host_base + kCaptchaUrlPrefixSuffix;
gaia_origin_url_ = "https://" + host_base;
client_login_url_ = gaia_origin_url_ + kClientLoginUrlSuffix;
+ service_login_url_ = gaia_origin_url_ + kServiceLoginUrlSuffix;
issue_auth_token_url_ = gaia_origin_url_ + kIssueAuthTokenUrlSuffix;
get_user_info_url_ = gaia_origin_url_ + kGetUserInfoUrlSuffix;
token_auth_url_ = gaia_origin_url_ + kTokenAuthUrlSuffix;
merge_session_url_ = gaia_origin_url_ + kMergeSessionUrlSuffix;
- get_oauth_token_url_ = gaia_origin_url_ + kGetOAuthTokenUrlSuffix;
+ // Federated login is not part of Gaia and has its own endpoints.
+ get_oauth_token_url_ = std::string(kDefaultFederatedLoginBaseUrl) +
+ kGetOAuthTokenUrlSuffix;
+
oauth_get_access_token_url_ = gaia_origin_url_ +
kOAuthGetAccessTokenUrlSuffix;
oauth_wrap_bridge_url_ = gaia_origin_url_ + kOAuthWrapBridgeUrlSuffix;
@@ -97,6 +107,10 @@ const std::string& GaiaUrls::client_login_url() {
return client_login_url_;
}
+const std::string& GaiaUrls::service_login_url() {
+ return service_login_url_;
+}
+
const std::string& GaiaUrls::issue_auth_token_url() {
return issue_auth_token_url_;
}
« no previous file with comments | « chrome/common/net/gaia/gaia_urls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698