| OLD | NEW |
| 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 "google_apis/gaia/gaia_urls.h" | 5 #include "google_apis/gaia/gaia_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 #include "google_apis/gaia/gaia_switches.h" | 9 #include "google_apis/gaia/gaia_switches.h" |
| 10 #include "google_apis/google_api_keys.h" | 10 #include "google_apis/google_api_keys.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 const char kGetUserInfoUrlSuffix[] = "GetUserInfo"; | 24 const char kGetUserInfoUrlSuffix[] = "GetUserInfo"; |
| 25 const char kTokenAuthUrlSuffix[] = "TokenAuth"; | 25 const char kTokenAuthUrlSuffix[] = "TokenAuth"; |
| 26 const char kMergeSessionUrlSuffix[] = "MergeSession"; | 26 const char kMergeSessionUrlSuffix[] = "MergeSession"; |
| 27 const char kOAuthGetAccessTokenUrlSuffix[] = "OAuthGetAccessToken"; | 27 const char kOAuthGetAccessTokenUrlSuffix[] = "OAuthGetAccessToken"; |
| 28 const char kOAuthWrapBridgeUrlSuffix[] = "OAuthWrapBridge"; | 28 const char kOAuthWrapBridgeUrlSuffix[] = "OAuthWrapBridge"; |
| 29 const char kOAuth1LoginUrlSuffix[] = "OAuthLogin"; | 29 const char kOAuth1LoginUrlSuffix[] = "OAuthLogin"; |
| 30 const char kOAuthRevokeTokenUrlSuffix[] = "AuthSubRevokeToken"; | 30 const char kOAuthRevokeTokenUrlSuffix[] = "AuthSubRevokeToken"; |
| 31 const char kListAccountsSuffix[] = "ListAccounts?json=standard"; | 31 const char kListAccountsSuffix[] = "ListAccounts?json=standard"; |
| 32 const char kEmbeddedSigninSuffix[] = "EmbeddedSignIn"; | 32 const char kEmbeddedSigninSuffix[] = "EmbeddedSignIn"; |
| 33 const char kAddAccountSuffix[] = "AddSession"; | 33 const char kAddAccountSuffix[] = "AddSession"; |
| 34 const char kGetCheckConnectionInfoSuffix[] = "GetCheckConnectionInfo"; |
| 34 | 35 |
| 35 // API calls from accounts.google.com (LSO) | 36 // API calls from accounts.google.com (LSO) |
| 36 const char kGetOAuthTokenUrlSuffix[] = "o/oauth/GetOAuthToken/"; | 37 const char kGetOAuthTokenUrlSuffix[] = "o/oauth/GetOAuthToken/"; |
| 37 const char kClientLoginToOAuth2UrlSuffix[] = "o/oauth2/programmatic_auth"; | 38 const char kClientLoginToOAuth2UrlSuffix[] = "o/oauth2/programmatic_auth"; |
| 38 const char kOAuth2AuthUrlSuffix[] = "o/oauth2/auth"; | 39 const char kOAuth2AuthUrlSuffix[] = "o/oauth2/auth"; |
| 39 const char kOAuth2RevokeUrlSuffix[] = "o/oauth2/revoke"; | 40 const char kOAuth2RevokeUrlSuffix[] = "o/oauth2/revoke"; |
| 40 const char kOAuth2TokenUrlSuffix[] = "o/oauth2/token"; | 41 const char kOAuth2TokenUrlSuffix[] = "o/oauth2/token"; |
| 41 | 42 |
| 42 // API calls from www.googleapis.com | 43 // API calls from www.googleapis.com |
| 43 const char kOAuth2IssueTokenUrlSuffix[] = "oauth2/v2/IssueToken"; | 44 const char kOAuth2IssueTokenUrlSuffix[] = "oauth2/v2/IssueToken"; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 token_auth_url_ = gaia_url_.Resolve(kTokenAuthUrlSuffix); | 98 token_auth_url_ = gaia_url_.Resolve(kTokenAuthUrlSuffix); |
| 98 merge_session_url_ = gaia_url_.Resolve(kMergeSessionUrlSuffix); | 99 merge_session_url_ = gaia_url_.Resolve(kMergeSessionUrlSuffix); |
| 99 oauth_get_access_token_url_ = | 100 oauth_get_access_token_url_ = |
| 100 gaia_url_.Resolve(kOAuthGetAccessTokenUrlSuffix); | 101 gaia_url_.Resolve(kOAuthGetAccessTokenUrlSuffix); |
| 101 oauth_wrap_bridge_url_ = gaia_url_.Resolve(kOAuthWrapBridgeUrlSuffix); | 102 oauth_wrap_bridge_url_ = gaia_url_.Resolve(kOAuthWrapBridgeUrlSuffix); |
| 102 oauth_revoke_token_url_ = gaia_url_.Resolve(kOAuthRevokeTokenUrlSuffix); | 103 oauth_revoke_token_url_ = gaia_url_.Resolve(kOAuthRevokeTokenUrlSuffix); |
| 103 oauth1_login_url_ = gaia_url_.Resolve(kOAuth1LoginUrlSuffix); | 104 oauth1_login_url_ = gaia_url_.Resolve(kOAuth1LoginUrlSuffix); |
| 104 list_accounts_url_ = gaia_url_.Resolve(kListAccountsSuffix); | 105 list_accounts_url_ = gaia_url_.Resolve(kListAccountsSuffix); |
| 105 embedded_signin_url_ = gaia_url_.Resolve(kEmbeddedSigninSuffix); | 106 embedded_signin_url_ = gaia_url_.Resolve(kEmbeddedSigninSuffix); |
| 106 add_account_url_ = gaia_url_.Resolve(kAddAccountSuffix); | 107 add_account_url_ = gaia_url_.Resolve(kAddAccountSuffix); |
| 108 get_check_connection_info_url_ = |
| 109 gaia_url_.Resolve(kGetCheckConnectionInfoSuffix); |
| 107 | 110 |
| 108 // URLs from accounts.google.com (LSO). | 111 // URLs from accounts.google.com (LSO). |
| 109 get_oauth_token_url_ = lso_origin_url_.Resolve(kGetOAuthTokenUrlSuffix); | 112 get_oauth_token_url_ = lso_origin_url_.Resolve(kGetOAuthTokenUrlSuffix); |
| 110 client_login_to_oauth2_url_ = | 113 client_login_to_oauth2_url_ = |
| 111 lso_origin_url_.Resolve(kClientLoginToOAuth2UrlSuffix); | 114 lso_origin_url_.Resolve(kClientLoginToOAuth2UrlSuffix); |
| 112 oauth2_auth_url_ = lso_origin_url_.Resolve(kOAuth2AuthUrlSuffix); | 115 oauth2_auth_url_ = lso_origin_url_.Resolve(kOAuth2AuthUrlSuffix); |
| 113 oauth2_token_url_ = lso_origin_url_.Resolve(kOAuth2TokenUrlSuffix); | 116 oauth2_token_url_ = lso_origin_url_.Resolve(kOAuth2TokenUrlSuffix); |
| 114 oauth2_revoke_url_ = lso_origin_url_.Resolve(kOAuth2RevokeUrlSuffix); | 117 oauth2_revoke_url_ = lso_origin_url_.Resolve(kOAuth2RevokeUrlSuffix); |
| 115 | 118 |
| 116 // URLs from www.googleapis.com. | 119 // URLs from www.googleapis.com. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 199 } |
| 197 | 200 |
| 198 const GURL& GaiaUrls::embedded_signin_url() const { | 201 const GURL& GaiaUrls::embedded_signin_url() const { |
| 199 return embedded_signin_url_; | 202 return embedded_signin_url_; |
| 200 } | 203 } |
| 201 | 204 |
| 202 const GURL& GaiaUrls::add_account_url() const { | 205 const GURL& GaiaUrls::add_account_url() const { |
| 203 return add_account_url_; | 206 return add_account_url_; |
| 204 } | 207 } |
| 205 | 208 |
| 209 const GURL& GaiaUrls::get_check_connection_info_url() const { |
| 210 return get_check_connection_info_url_; |
| 211 } |
| 212 |
| 206 const std::string& GaiaUrls::oauth2_chrome_client_id() const { | 213 const std::string& GaiaUrls::oauth2_chrome_client_id() const { |
| 207 return oauth2_chrome_client_id_; | 214 return oauth2_chrome_client_id_; |
| 208 } | 215 } |
| 209 | 216 |
| 210 const std::string& GaiaUrls::oauth2_chrome_client_secret() const { | 217 const std::string& GaiaUrls::oauth2_chrome_client_secret() const { |
| 211 return oauth2_chrome_client_secret_; | 218 return oauth2_chrome_client_secret_; |
| 212 } | 219 } |
| 213 | 220 |
| 214 const GURL& GaiaUrls::client_login_to_oauth2_url() const { | 221 const GURL& GaiaUrls::client_login_to_oauth2_url() const { |
| 215 return client_login_to_oauth2_url_; | 222 return client_login_to_oauth2_url_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 231 return oauth2_token_info_url_; | 238 return oauth2_token_info_url_; |
| 232 } | 239 } |
| 233 | 240 |
| 234 const GURL& GaiaUrls::oauth2_revoke_url() const { | 241 const GURL& GaiaUrls::oauth2_revoke_url() const { |
| 235 return oauth2_revoke_url_; | 242 return oauth2_revoke_url_; |
| 236 } | 243 } |
| 237 | 244 |
| 238 const GURL& GaiaUrls::gaia_login_form_realm() const { | 245 const GURL& GaiaUrls::gaia_login_form_realm() const { |
| 239 return gaia_url_; | 246 return gaia_url_; |
| 240 } | 247 } |
| OLD | NEW |