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

Unified Diff: chrome/browser/sync/glue/sync_backend_registrar.cc

Issue 17552014: [Sync] Have SBH tell SyncManager which types to purge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dchecks Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/sync_backend_registrar.cc
diff --git a/chrome/browser/sync/glue/sync_backend_registrar.cc b/chrome/browser/sync/glue/sync_backend_registrar.cc
index 5d99b0d25404645718eefb7ecc2626ee0014fdfa..69898b14c652b80693db61fa8942ba85412af680 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar.cc
+++ b/chrome/browser/sync/glue/sync_backend_registrar.cc
@@ -85,6 +85,11 @@ SyncBackendRegistrar::SyncBackendRegistrar(
}
}
+SyncBackendRegistrar::~SyncBackendRegistrar() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(stopped_on_ui_thread_);
+}
+
void SyncBackendRegistrar::SetInitialTypes(syncer::ModelTypeSet initial_types) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
base::AutoLock lock(lock_);
@@ -112,11 +117,8 @@ void SyncBackendRegistrar::SetInitialTypes(syncer::ModelTypeSet initial_types) {
<< "Password store not initialized, cannot sync passwords";
routing_info_.erase(syncer::PASSWORDS);
}
-}
-SyncBackendRegistrar::~SyncBackendRegistrar() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(stopped_on_ui_thread_);
+ last_configured_types_ = syncer::GetRoutingInfoTypes(routing_info_);
}
bool SyncBackendRegistrar::IsNigoriEnabled() const {
@@ -165,10 +167,15 @@ syncer::ModelTypeSet SyncBackendRegistrar::ConfigureDataTypes(
<< syncer::ModelTypeSetToString(types_to_remove)
<< " to get new routing info "
<<syncer::ModelSafeRoutingInfoToString(routing_info_);
+ last_configured_types_ = syncer::GetRoutingInfoTypes(routing_info_);
return newly_added_types;
}
+syncer::ModelTypeSet SyncBackendRegistrar::GetLastConfiguredTypes() const {
+ return last_configured_types_;
+}
+
void SyncBackendRegistrar::StopOnUIThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!stopped_on_ui_thread_);
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_registrar.h ('k') | chrome/browser/sync/glue/sync_backend_registrar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698