| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/signin/signin_manager.h" | 5 #include "chrome/browser/signin/signin_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 return; | 323 return; |
| 324 } | 324 } |
| 325 | 325 |
| 326 ClearTransientSigninData(); | 326 ClearTransientSigninData(); |
| 327 authenticated_username_.clear(); | 327 authenticated_username_.clear(); |
| 328 profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); | 328 profile_->GetPrefs()->ClearPref(prefs::kGoogleServicesUsername); |
| 329 profile_->GetPrefs()->ClearPref(prefs::kIsGooglePlusUser); | 329 profile_->GetPrefs()->ClearPref(prefs::kIsGooglePlusUser); |
| 330 TokenService* token_service = TokenServiceFactory::GetForProfile(profile_); | 330 TokenService* token_service = TokenServiceFactory::GetForProfile(profile_); |
| 331 token_service->ResetCredentialsInMemory(); | 331 token_service->ResetCredentialsInMemory(); |
| 332 token_service->EraseTokensFromDB(); | 332 token_service->EraseTokensFromDB(); |
| 333 content::NotificationService::current()->Notify( |
| 334 chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, |
| 335 content::Source<Profile>(profile_), |
| 336 content::NotificationService::NoDetails()); |
| 333 } | 337 } |
| 334 | 338 |
| 335 bool SigninManager::AuthInProgress() const { | 339 bool SigninManager::AuthInProgress() const { |
| 336 return !possibly_invalid_username_.empty(); | 340 return !possibly_invalid_username_.empty(); |
| 337 } | 341 } |
| 338 | 342 |
| 339 void SigninManager::OnGetUserInfoKeyNotFound(const std::string& key) { | 343 void SigninManager::OnGetUserInfoKeyNotFound(const std::string& key) { |
| 340 DCHECK(key == kGetInfoEmailKey); | 344 DCHECK(key == kGetInfoEmailKey); |
| 341 LOG(ERROR) << "Account is not associated with a valid email address. " | 345 LOG(ERROR) << "Account is not associated with a valid email address. " |
| 342 << "Login failed."; | 346 << "Login failed."; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 profile_->GetRequestContext())); | 466 profile_->GetRequestContext())); |
| 463 } | 467 } |
| 464 | 468 |
| 465 client_login_->StartMergeSession(tok_details->token()); | 469 client_login_->StartMergeSession(tok_details->token()); |
| 466 | 470 |
| 467 // We only want to do this once per sign-in. | 471 // We only want to do this once per sign-in. |
| 468 CleanupNotificationRegistration(); | 472 CleanupNotificationRegistration(); |
| 469 } | 473 } |
| 470 #endif | 474 #endif |
| 471 } | 475 } |
| OLD | NEW |