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()) |