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

Unified Diff: chrome/browser/signin/signin_manager.cc

Issue 10213013: Now CHECKs to make sure we log out before clearing the token db (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. 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 | chrome/browser/signin/token_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager.cc
diff --git a/chrome/browser/signin/signin_manager.cc b/chrome/browser/signin/signin_manager.cc
index 2caf777b076d1b35cc484b586bbf8b9d90a85f98..a636676b9a572afa3e39829a4bfe460d39144d83 100644
--- a/chrome/browser/signin/signin_manager.cc
+++ b/chrome/browser/signin/signin_manager.cc
@@ -56,6 +56,13 @@ void SigninManager::Initialize(Profile* profile) {
DCHECK(!IsInitialized());
profile_ = profile;
+ // If the user is clearing the token service from the command line, then
+ // clear their login info also (not valid to be logged in without any
+ // tokens).
+ CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kClearTokenService))
+ profile->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername);
+
std::string user = profile_->GetPrefs()->GetString(
prefs::kGoogleServicesUsername);
if (!user.empty())
« no previous file with comments | « no previous file | chrome/browser/signin/token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698