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

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

Issue 7671007: [ChromeOS] Fix a problem that invalid oauth token is not refreshed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 e2c29372939c4e0f599ce08a253691f0d13a3826..1164450791072249c62d9f22a39a444e01c2e2f7 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -498,10 +498,10 @@ void LoginUtilsImpl::OnProfileCreated(Profile* user_profile, Status status) {
}
std::string oauth1_token;
std::string oauth1_secret;
- if (!has_cookies_ &&
- ReadOAuth1AccessToken(user_profile, &oauth1_token, &oauth1_secret)) {
- // Verify OAuth access token when we find it in the profile and no cookies
- // available because user is not signing in using extension.
+ if (ReadOAuth1AccessToken(user_profile, &oauth1_token, &oauth1_secret) ||
+ !has_cookies_) {
+ // Verify OAuth access token when we find it in the profile and always if
+ // if we don't have cookies.
authenticator_->VerifyOAuth1AccessToken(oauth1_token, oauth1_secret);
} else {
// If we don't have it, fetch OAuth1 access token.
« 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