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

Unified Diff: google_apis/gaia/gaia_urls.cc

Issue 10910234: Moved /GetOAuthToken (OAuth1) GAIA request to accounts.google.com. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | « google_apis/gaia/gaia_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_urls.cc
diff --git a/google_apis/gaia/gaia_urls.cc b/google_apis/gaia/gaia_urls.cc
index aa5ac38082471ff568480695131bb843e382bad0..a7266d7e7dc4041821f7b7cdede64bd9d354180a 100644
--- a/google_apis/gaia/gaia_urls.cc
+++ b/google_apis/gaia/gaia_urls.cc
@@ -12,10 +12,6 @@ namespace {
// Gaia service constants
const char kDefaultGaiaBaseUrl[] = "accounts.google.com";
-
-// Gaia service constants
-const char kDefaultGaiaOAuthBaseUrl[] = "www.google.com";
-
const char kCaptchaUrlPrefixSuffix[] = "/";
const char kClientLoginUrlSuffix[] = "/ClientLogin";
const char kServiceLoginUrlSuffix[] = "/ServiceLogin";
@@ -32,7 +28,7 @@ const char kOAuthRevokeTokenUrlSuffix[] = "/AuthSubRevokeToken";
// Federated login constants
const char kDefaultFederatedLoginHost[] = "www.google.com";
const char kDefaultFederatedLoginPath[] = "/accounts";
-const char kGetOAuthTokenUrlSuffix[] = "/o8/GetOAuthToken";
+const char kGetOAuthTokenUrlSuffix[] = "/o/oauth/GetOAuthToken/";
const char kClientLoginToOAuth2Url[] =
"https://accounts.google.com/o/oauth2/programmatic_auth";
@@ -86,29 +82,7 @@ GaiaUrls::GaiaUrls() {
get_user_info_url_ = gaia_url_base + kGetUserInfoUrlSuffix;
token_auth_url_ = gaia_url_base + kTokenAuthUrlSuffix;
merge_session_url_ = gaia_url_base + kMergeSessionUrlSuffix;
-
- // Federated login is not part of Gaia and has its own endpoints.
- std::string oauth_host_base;
- GetSwitchValueWithDefault(switches::kGaiaOAuthHost,
- kDefaultFederatedLoginHost,
- &oauth_host_base);
-
- std::string gaia_oauth_url_base = "https://"+oauth_host_base;
- if (command_line->HasSwitch(switches::kGaiaOAuthUrlPath)) {
- std::string path =
- command_line->GetSwitchValueASCII(switches::kGaiaOAuthUrlPath);
- if (!path.empty()) {
- if (path[0] != '/')
- gaia_oauth_url_base.append("/");
-
- gaia_oauth_url_base.append(path);
- }
- } else {
- gaia_oauth_url_base.append(kDefaultFederatedLoginPath);
- }
- get_oauth_token_url_ = gaia_oauth_url_base +
- kGetOAuthTokenUrlSuffix;
-
+ get_oauth_token_url_ = gaia_url_base + kGetOAuthTokenUrlSuffix;
oauth_get_access_token_url_ = gaia_url_base +
kOAuthGetAccessTokenUrlSuffix;
oauth_wrap_bridge_url_ = gaia_url_base + kOAuthWrapBridgeUrlSuffix;
« no previous file with comments | « google_apis/gaia/gaia_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698