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

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

Issue 7583010: [ChromeOS] Fake OAUTH_TOKEN_STATUS_VALID when "--skip-oauth-login" is set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: set initial value for oauth_token_status per sidor 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/user_manager.cc
diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc
index 8dd7e1725b8bde6b2d9807ea7e69211e5ba1e52e..683176bb9fa38ac2e21443870e1389feddc0d26a 100644
--- a/chrome/browser/chromeos/login/user_manager.cc
+++ b/chrome/browser/chromeos/login/user_manager.cc
@@ -289,12 +289,18 @@ std::vector<UserManager::User> UserManager::GetUsers() const {
user.set_email(email);
// Get OAuth token status.
- int oauth_token_status;
- if (prefs_oauth_status &&
- prefs_oauth_status->GetIntegerWithoutPathExpansion(email,
- &oauth_token_status)) {
- user.set_oauth_token_status(
- static_cast<OAuthTokenStatus>(oauth_token_status));
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSkipOAuthLogin)) {
+ // Use OAUTH_TOKEN_STATUS_VALID flag if kSkipOAuthLogin is present.
+ user.set_oauth_token_status(OAUTH_TOKEN_STATUS_VALID);
+ } else {
+ int oauth_token_status = OAUTH_TOKEN_STATUS_UNKNOWN;
+ if (prefs_oauth_status &&
+ prefs_oauth_status->GetIntegerWithoutPathExpansion(email,
+ &oauth_token_status)) {
+ user.set_oauth_token_status(
+ static_cast<OAuthTokenStatus>(oauth_token_status));
+ }
}
UserImages::const_iterator image_it = user_images_.find(email);
« 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