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

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: Self review 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..56b279c6fbc81cccedb706a35363edb1c1902faa 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_);
@@ -114,11 +119,6 @@ void SyncBackendRegistrar::SetInitialTypes(syncer::ModelTypeSet initial_types) {
}
rlarocque 2013/06/21 20:40:03 Should last_configured_types_ be initialized here?
Nicolas Zea 2013/06/21 21:20:48 Good point, done.
}
-SyncBackendRegistrar::~SyncBackendRegistrar() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK(stopped_on_ui_thread_);
-}
-
bool SyncBackendRegistrar::IsNigoriEnabled() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
base::AutoLock lock(lock_);
@@ -165,10 +165,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