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

Unified Diff: sync/internal_api/test/fake_sync_manager.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
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/test/fake_sync_manager.cc
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc
index 4769585343a807a7b83d903f46cc9b0d1d2a837f..cb3e5183a224bd45fdbd49767d701372c44b6b9f 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -193,27 +193,24 @@ void FakeSyncManager::StartSyncingNormally(
void FakeSyncManager::ConfigureSyncer(
ConfigureReason reason,
ModelTypeSet to_download,
+ ModelTypeSet to_purge,
ModelTypeSet to_journal,
ModelTypeSet to_unapply,
- ModelTypeSet to_ignore,
const ModelSafeRoutingInfo& new_routing_info,
const base::Closure& ready_task,
const base::Closure& retry_task) {
last_configure_reason_ = reason;
ModelTypeSet enabled_types = GetRoutingInfoTypes(new_routing_info);
- ModelTypeSet disabled_types = Difference(
- ModelTypeSet::All(), enabled_types);
- disabled_types.RemoveAll(to_ignore);
ModelTypeSet success_types = to_download;
success_types.RemoveAll(configure_fail_types_);
DVLOG(1) << "Faking configuration. Downloading: "
<< ModelTypeSetToString(success_types) << ". Cleaning: "
- << ModelTypeSetToString(disabled_types);
+ << ModelTypeSetToString(to_purge);
// Update our fake directory by clearing and fake-downloading as necessary.
UserShare* share = GetUserShare();
- share->directory->PurgeEntriesWithTypeIn(disabled_types,
+ share->directory->PurgeEntriesWithTypeIn(to_purge,
to_journal,
to_unapply);
for (ModelTypeSet::Iterator it = success_types.First(); it.Good(); it.Inc()) {
@@ -227,9 +224,9 @@ void FakeSyncManager::ConfigureSyncer(
// TODO(sync): consider only cleaning those types that were recently disabled,
// if this isn't the first cleanup, which more accurately reflects the
// behavior of the real cleanup logic.
- initial_sync_ended_types_.RemoveAll(disabled_types);
- progress_marker_types_.RemoveAll(disabled_types);
- cleaned_types_.PutAll(disabled_types);
+ initial_sync_ended_types_.RemoveAll(to_purge);
+ progress_marker_types_.RemoveAll(to_purge);
+ cleaned_types_.PutAll(to_purge);
// Now simulate the actual configuration for those types that successfully
// download + apply.
« no previous file with comments | « sync/internal_api/sync_manager_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698