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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 10008079: [cros] Use system request context for OAuth1 access token verification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use system request context Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 4ee90130ea9cbe704dcddced558e82a3e46cf2ac..4d1e951095e368bd8cbf4634506a9665a668db0e 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -202,12 +202,12 @@ class OAuthLoginVerifier : public base::SupportsWeakPtr<OAuthLoginVerifier>,
const std::string& username)
: delegate_(delegate),
oauth_fetcher_(this,
- user_profile->GetOffTheRecordProfile()->GetRequestContext(),
Nikita (slow) 2012/04/13 12:45:55 Zel, what was the reason why we initially were usi
- user_profile->GetOffTheRecordProfile(),
- kServiceScopeChromeOS),
+ g_browser_process->system_request_context(),
+ user_profile->GetOffTheRecordProfile(),
+ kServiceScopeChromeOS),
gaia_fetcher_(this,
- std::string(GaiaConstants::kChromeOSSource),
- user_profile->GetRequestContext()),
+ std::string(GaiaConstants::kChromeOSSource),
+ user_profile->GetRequestContext()),
oauth1_token_(oauth1_token),
oauth1_secret_(oauth1_secret),
username_(username),
@@ -292,10 +292,9 @@ class OAuthLoginVerifier : public base::SupportsWeakPtr<OAuthLoginVerifier>,
// to rerun the verification process if detects transient network or service
// errors.
bool RetryOnError(const GoogleServiceAuthError& error) {
- // If we can't connect to GAIA due to network or service related reasons,
- // we should attempt OAuth token verification again.
if (error.state() == GoogleServiceAuthError::CONNECTION_FAILED ||
- error.state() == GoogleServiceAuthError::SERVICE_UNAVAILABLE) {
+ error.state() == GoogleServiceAuthError::SERVICE_UNAVAILABLE ||
+ error.state() == GoogleServiceAuthError::REQUEST_CANCELED) {
if (verification_count_ < kMaxOAuthTokenVerificationAttemptCount) {
BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE,
base::Bind(&OAuthLoginVerifier::ContinueVerification, AsWeakPtr()),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698