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

Side by Side Diff: components/browser_sync/profile_sync_service.cc

Issue 2576203004: [Sync] Remove SyncEngine::UnregisterInvalidationIds (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | components/sync/driver/glue/sync_backend_host_impl.h » ('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 "components/browser_sync/profile_sync_service.h" 5 #include "components/browser_sync/profile_sync_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <map> 10 #include <map>
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 797
798 NotifyObservers(); 798 NotifyObservers();
799 799
800 // Mark this as a clean shutdown(without crash). 800 // Mark this as a clean shutdown(without crash).
801 sync_prefs_.SetCleanShutdown(true); 801 sync_prefs_.SetCleanShutdown(true);
802 } 802 }
803 803
804 void ProfileSyncService::StopImpl(SyncStopDataFate data_fate) { 804 void ProfileSyncService::StopImpl(SyncStopDataFate data_fate) {
805 switch (data_fate) { 805 switch (data_fate) {
806 case KEEP_DATA: 806 case KEEP_DATA:
807 // TODO(maxbogue): Investigate whether this logic can/should be moved
808 // into ShutdownImpl or the sync engine itself.
809 if (HasSyncingEngine()) {
810 engine_->UnregisterInvalidationIds();
811 }
812 ShutdownImpl(syncer::STOP_SYNC); 807 ShutdownImpl(syncer::STOP_SYNC);
813 break; 808 break;
814 case CLEAR_DATA: 809 case CLEAR_DATA:
815 // Clear prefs (including SyncSetupHasCompleted) before shutting down so 810 // Clear prefs (including SyncSetupHasCompleted) before shutting down so
816 // PSS clients don't think we're set up while we're shutting down. 811 // PSS clients don't think we're set up while we're shutting down.
817 sync_prefs_.ClearPreferences(); 812 sync_prefs_.ClearPreferences();
818 ClearUnrecoverableError(); 813 ClearUnrecoverableError();
819 ShutdownImpl(syncer::DISABLE_SYNC); 814 ShutdownImpl(syncer::DISABLE_SYNC);
820 break; 815 break;
821 } 816 }
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2614 2609
2615 DCHECK(startup_controller_->IsSetupInProgress()); 2610 DCHECK(startup_controller_->IsSetupInProgress());
2616 startup_controller_->SetSetupInProgress(false); 2611 startup_controller_->SetSetupInProgress(false);
2617 2612
2618 if (IsEngineInitialized()) 2613 if (IsEngineInitialized())
2619 ReconfigureDatatypeManager(); 2614 ReconfigureDatatypeManager();
2620 NotifyObservers(); 2615 NotifyObservers();
2621 } 2616 }
2622 2617
2623 } // namespace browser_sync 2618 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | components/sync/driver/glue/sync_backend_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698