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

Side by Side Diff: chrome/browser/sync/profile_sync_service.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 | « chrome/browser/signin/token_service.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.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/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // Clear prefs (including SyncSetupHasCompleted) before shutting down so 527 // Clear prefs (including SyncSetupHasCompleted) before shutting down so
528 // PSS clients don't think we're set up while we're shutting down. 528 // PSS clients don't think we're set up while we're shutting down.
529 sync_prefs_.ClearPreferences(); 529 sync_prefs_.ClearPreferences();
530 invalidator_storage_.Clear(); 530 invalidator_storage_.Clear();
531 ClearUnrecoverableError(); 531 ClearUnrecoverableError();
532 ShutdownImpl(true); 532 ShutdownImpl(true);
533 533
534 // TODO(atwilson): Don't call SignOut() on *any* platform - move this into 534 // TODO(atwilson): Don't call SignOut() on *any* platform - move this into
535 // the UI layer if needed (sync activity should never result in the user 535 // the UI layer if needed (sync activity should never result in the user
536 // being logged out of all chrome services). 536 // being logged out of all chrome services).
537 if (!auto_start_enabled_) 537 if (!auto_start_enabled_ && !signin_->GetAuthenticatedUsername().empty())
538 signin_->SignOut(); 538 signin_->SignOut();
539 539
540 NotifyObservers(); 540 NotifyObservers();
541 } 541 }
542 542
543 bool ProfileSyncService::HasSyncSetupCompleted() const { 543 bool ProfileSyncService::HasSyncSetupCompleted() const {
544 return sync_prefs_.HasSyncSetupCompleted(); 544 return sync_prefs_.HasSyncSetupCompleted();
545 } 545 }
546 546
547 void ProfileSyncService::SetSyncSetupCompleted() { 547 void ProfileSyncService::SetSyncSetupCompleted() {
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru. 1664 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine d-behaviour-after-directly-calling-the-destru.
1665 ProfileSyncService* old_this = this; 1665 ProfileSyncService* old_this = this;
1666 this->~ProfileSyncService(); 1666 this->~ProfileSyncService();
1667 new(old_this) ProfileSyncService( 1667 new(old_this) ProfileSyncService(
1668 new ProfileSyncComponentsFactoryImpl(profile, 1668 new ProfileSyncComponentsFactoryImpl(profile,
1669 CommandLine::ForCurrentProcess()), 1669 CommandLine::ForCurrentProcess()),
1670 profile, 1670 profile,
1671 signin, 1671 signin,
1672 behavior); 1672 behavior);
1673 } 1673 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/token_service.cc ('k') | chrome/browser/ui/webui/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698