summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthaidn@google.com <thaidn@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-14 06:55:57 +0000
committerthaidn@google.com <thaidn@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-14 06:55:57 +0000
commit1406864f87ed2d76d56653a507754c8dc19aa4a8 (patch)
treee8f9b983f46113a345ce3e2f3cc48e3fc0e0157a
parentcb20fb3ec5f6e470a6f4df6c485142bda8e23171 (diff)
downloadchromium_src-1406864f87ed2d76d56653a507754c8dc19aa4a8.zip
chromium_src-1406864f87ed2d76d56653a507754c8dc19aa4a8.tar.gz
chromium_src-1406864f87ed2d76d56653a507754c8dc19aa4a8.tar.bz2
/OAuthLogin requests should use ChannelID.
R=mattm@chromium.org BUG=315301 Review URL: https://codereview.chromium.org/70633004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235076 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/oauth2_login_verifier.cc12
-rw-r--r--chrome/browser/chromeos/login/oauth2_login_verifier.h1
-rw-r--r--google_apis/gaia/gaia_auth_fetcher.cc8
3 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/login/oauth2_login_verifier.cc b/chrome/browser/chromeos/login/oauth2_login_verifier.cc
index 60c31ca..77a5eca 100644
--- a/chrome/browser/chromeos/login/oauth2_login_verifier.cc
+++ b/chrome/browser/chromeos/login/oauth2_login_verifier.cc
@@ -97,11 +97,11 @@ void OAuth2LoginVerifier::StartFetchingOAuthLoginAccessToken(Profile* profile) {
void OAuth2LoginVerifier::StartOAuthLoginForUberToken() {
// No service will fetch us uber auth token.
- gaia_system_fetcher_.reset(
+ gaia_fetcher_.reset(
new GaiaAuthFetcher(this,
std::string(GaiaConstants::kChromeOSSource),
- system_request_context_.get()));
- gaia_system_fetcher_->StartTokenFetchForUberAuthExchange(access_token_);
+ user_request_context_.get()));
+ gaia_fetcher_->StartTokenFetchForUberAuthExchange(access_token_);
}
@@ -127,11 +127,11 @@ void OAuth2LoginVerifier::OnUberAuthTokenFailure(
void OAuth2LoginVerifier::StartOAuthLoginForGaiaCredentials() {
// No service will fetch us uber auth token.
- gaia_system_fetcher_.reset(
+ gaia_fetcher_.reset(
new GaiaAuthFetcher(this,
std::string(GaiaConstants::kChromeOSSource),
- system_request_context_.get()));
- gaia_system_fetcher_->StartOAuthLogin(access_token_, EmptyString());
+ user_request_context_.get()));
+ gaia_fetcher_->StartOAuthLogin(access_token_, EmptyString());
}
void OAuth2LoginVerifier::OnClientLoginSuccess(
diff --git a/chrome/browser/chromeos/login/oauth2_login_verifier.h b/chrome/browser/chromeos/login/oauth2_login_verifier.h
index d83e72b..2f36d45 100644
--- a/chrome/browser/chromeos/login/oauth2_login_verifier.h
+++ b/chrome/browser/chromeos/login/oauth2_login_verifier.h
@@ -99,7 +99,6 @@ class OAuth2LoginVerifier : public base::SupportsWeakPtr<OAuth2LoginVerifier>,
OAuth2LoginVerifier::Delegate* delegate_;
scoped_refptr<net::URLRequestContextGetter> system_request_context_;
scoped_refptr<net::URLRequestContextGetter> user_request_context_;
- scoped_ptr<GaiaAuthFetcher> gaia_system_fetcher_;
scoped_ptr<GaiaAuthFetcher> gaia_fetcher_;
std::string access_token_;
std::string gaia_token_;
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc
index 8c0eb9a..c5254f4 100644
--- a/google_apis/gaia/gaia_auth_fetcher.cc
+++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -220,8 +220,8 @@ net::URLFetcher* GaiaAuthFetcher::CreateGaiaFetcher(
// The Gaia token exchange requests do not require any cookie-based
// identification as part of requests. We suppress sending any cookies to
// maintain a separation between the user's browsing and Chrome's internal
- // services. Where such mixing is desired (MergeSession), it will be done
- // explicitly.
+ // services. Where such mixing is desired (MergeSession or OAuthLogin), it
+ // will be done explicitly.
to_return->SetLoadFlags(load_flags);
// Fetchers are sometimes cancelled because a network change was detected,
@@ -637,7 +637,7 @@ void GaiaAuthFetcher::StartTokenFetchForUberAuthExchange(
std::string(),
authentication_header,
uberauth_token_gurl_,
- kLoadFlagsIgnoreCookies,
+ net::LOAD_NORMAL,
this));
fetch_pending_ = true;
fetcher_->Start();
@@ -654,7 +654,7 @@ void GaiaAuthFetcher::StartOAuthLogin(const std::string& access_token,
request_body_,
authentication_header,
oauth_login_gurl_,
- kLoadFlagsIgnoreCookies,
+ net::LOAD_NORMAL,
this));
fetch_pending_ = true;
fetcher_->Start();