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

Unified Diff: components/sync/engine/sync_manager.h

Issue 2563883006: [Sync] Separate purge types step from sync manager configuration. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/engine/fake_sync_manager.cc ('k') | components/sync/engine_impl/sync_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine/sync_manager.h
diff --git a/components/sync/engine/sync_manager.h b/components/sync/engine/sync_manager.h
index dadfb4ea68d897c31ed8873a3c90141e2563e4e7..37e7de633eca0dd9d13d58b571cc697c6a7378d0 100644
--- a/components/sync/engine/sync_manager.h
+++ b/components/sync/engine/sync_manager.h
@@ -290,7 +290,15 @@ class SyncManager {
// Purge from the directory those types with non-empty progress markers
// but without initial synced ended set.
// Returns false if an error occurred, true otherwise.
- virtual bool PurgePartiallySyncedTypes() = 0;
+ virtual void PurgePartiallySyncedTypes() = 0;
+
+ // Purge those disabled types as specified by |to_purge|. |to_journal| and
+ // |to_unapply| specify subsets that require special handling. |to_journal|
+ // types are saved into the delete journal, while |to_unapply| have only
+ // their local data deleted, while their server data is preserved.
+ virtual void PurgeDisabledTypes(ModelTypeSet to_purge,
+ ModelTypeSet to_journal,
+ ModelTypeSet to_unapply) = 0;
// Update tokens that we're using in Sync. Email must stay the same.
virtual void UpdateCredentials(const SyncCredentials& credentials) = 0;
@@ -303,20 +311,12 @@ class SyncManager {
// any configuration tasks needed as determined by the params. Once complete,
// syncer will remain in CONFIGURATION_MODE until StartSyncingNormally is
// called.
- // Data whose types are not in |new_routing_info| are purged from sync
- // directory, unless they're part of |to_ignore|, in which case they're left
- // untouched. The purged data is backed up in delete journal for recovery in
- // next session if its type is in |to_journal|. If in |to_unapply|
- // only the local data is removed; the server data is preserved.
// |ready_task| is invoked when the configuration completes.
// |retry_task| is invoked if the configuration job could not immediately
// execute. |ready_task| will still be called when it eventually
// does finish.
virtual void ConfigureSyncer(ConfigureReason reason,
ModelTypeSet to_download,
- ModelTypeSet to_purge,
- ModelTypeSet to_journal,
- ModelTypeSet to_unapply,
const ModelSafeRoutingInfo& new_routing_info,
const base::Closure& ready_task,
const base::Closure& retry_task) = 0;
« no previous file with comments | « components/sync/engine/fake_sync_manager.cc ('k') | components/sync/engine_impl/sync_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698