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

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

Issue 1081413003: [Sync] Have configuration specify which datatypes are ready to sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix components_unittests Created 5 years, 8 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_host_impl.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.cc b/chrome/browser/sync/glue/sync_backend_host_impl.cc
index 1455d172658c42aa86961de6b856bb87d571312f..26538eb1749b7f2049347430227e63d650afdc1a 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc
@@ -324,11 +324,11 @@ void SyncBackendHostImpl::UnregisterInvalidationIds() {
}
}
-void SyncBackendHostImpl::ConfigureDataTypes(
+syncer::ModelTypeSet SyncBackendHostImpl::ConfigureDataTypes(
syncer::ConfigureReason reason,
const DataTypeConfigStateMap& config_state_map,
- const base::Callback<void(syncer::ModelTypeSet,
- syncer::ModelTypeSet)>& ready_task,
+ const base::Callback<void(syncer::ModelTypeSet, syncer::ModelTypeSet)>&
+ ready_task,
const base::Callback<void()>& retry_callback) {
// Only one configure is allowed at a time. This is guaranteed by our
// callers. The SyncBackendHostImpl requests one configure as the backend is
@@ -445,6 +445,12 @@ void SyncBackendHostImpl::ConfigureDataTypes(
routing_info,
ready_task,
retry_callback);
+
+ DCHECK(syncer::Intersection(active_types, types_to_purge).Empty());
+ DCHECK(syncer::Intersection(active_types, fatal_types).Empty());
+ DCHECK(syncer::Intersection(active_types, unapply_types).Empty());
+ DCHECK(syncer::Intersection(active_types, inactive_types).Empty());
+ return syncer::Difference(active_types, types_to_download);
}
void SyncBackendHostImpl::EnableEncryptEverything() {
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.h ('k') | chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698