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

Side by Side Diff: chrome/browser/signin/signin_manager.cc

Issue 10496010: Updated SigninManager and TokenService to generate notifications at signout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment per review. Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/signin/token_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« 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