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

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

Issue 11991002: Merge 176800 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
Patch Set: Created 7 years, 11 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 | « chrome/browser/chromeos/login/user.h ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_manager_impl.cc
===================================================================
--- chrome/browser/chromeos/login/user_manager_impl.cc (revision 177312)
+++ chrome/browser/chromeos/login/user_manager_impl.cc (working copy)
@@ -405,23 +405,15 @@
const std::string& username) const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kSkipOAuthLogin)) {
- // Use OAUTH_TOKEN_STATUS_VALID flag if kSkipOAuthLogin is present.
- return User::OAUTH_TOKEN_STATUS_VALID;
- } else {
- PrefService* local_state = g_browser_process->local_state();
- const DictionaryValue* prefs_oauth_status =
- local_state->GetDictionary(kUserOAuthTokenStatus);
-
- int oauth_token_status = User::OAUTH_TOKEN_STATUS_UNKNOWN;
- if (prefs_oauth_status &&
- prefs_oauth_status->GetIntegerWithoutPathExpansion(username,
- &oauth_token_status)) {
- return static_cast<User::OAuthTokenStatus>(oauth_token_status);
- }
+ PrefService* local_state = g_browser_process->local_state();
+ const DictionaryValue* prefs_oauth_status =
+ local_state->GetDictionary(kUserOAuthTokenStatus);
+ int oauth_token_status = User::OAUTH_TOKEN_STATUS_UNKNOWN;
+ if (prefs_oauth_status &&
+ prefs_oauth_status->GetIntegerWithoutPathExpansion(
+ username, &oauth_token_status)) {
+ return static_cast<User::OAuthTokenStatus>(oauth_token_status);
}
-
return User::OAUTH_TOKEN_STATUS_UNKNOWN;
}
@@ -534,8 +526,11 @@
// TODO(altimofeev): this code isn't needed after crosbug.com/25978 is
// implemented.
DVLOG(1) << "Invalidate OAuth token because of a sync error.";
- SaveUserOAuthStatus(logged_in_user_->email(),
- User::OAUTH_TOKEN_STATUS_INVALID);
+ SaveUserOAuthStatus(
+ logged_in_user_->email(),
+ CommandLine::ForCurrentProcess()->HasSwitch(::switches::kForceOAuth1) ?
+ User::OAUTH1_TOKEN_STATUS_INVALID :
+ User::OAUTH2_TOKEN_STATUS_INVALID);
}
}
« no previous file with comments | « chrome/browser/chromeos/login/user.h ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698