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

Unified Diff: sync/engine/sync_scheduler.h

Issue 1251203002: [Sync] Add ClearServerData support to Sync Scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve comments Created 5 years, 5 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 | « no previous file | sync/engine/sync_scheduler_impl.h » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler.h
diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h
index 37ca968c928341f46a96a7c43cca66ba48e253d3..4e5e694b94d1436ab003239b0a86c4a289575832 100644
--- a/sync/engine/sync_scheduler.h
+++ b/sync/engine/sync_scheduler.h
@@ -46,6 +46,14 @@ struct SYNC_EXPORT_PRIVATE ConfigurationParams {
base::Closure retry_task;
};
+struct SYNC_EXPORT_PRIVATE ClearParams {
+ ClearParams(const base::Closure& report_success_task);
+ ~ClearParams();
+
+ // Callback to invoke on successful completion.
+ base::Closure report_success_task;
+};
+
class SYNC_EXPORT_PRIVATE SyncScheduler
: public sessions::SyncSession::Delegate {
public:
@@ -55,6 +63,10 @@ class SYNC_EXPORT_PRIVATE SyncScheduler
// specific type only, and not continue syncing until we are moved into
// normal mode.
CONFIGURATION_MODE,
+ // This mode is used to issue a clear server data command. The scheduler
+ // may only transition to this mode from the CONFIGURATION_MODE. When in
+ // this mode, the only schedulable operation is |SchedulerClearServerData|.
+ CLEAR_SERVER_DATA_MODE,
// Resumes polling and allows nudges, drops configuration tasks. Runs
// through entire sync cycle.
NORMAL_MODE,
@@ -81,6 +93,11 @@ class SYNC_EXPORT_PRIVATE SyncScheduler
// Note: must already be in CONFIGURATION mode.
virtual void ScheduleConfiguration(const ConfigurationParams& params) = 0;
+ // Schedules clear of server data in preparation for transitioning to
+ // passphrase encryption. The scheduler must be in CLEAR_SERVER_DATA_MODE
+ // before calling this method.
+ virtual void ScheduleClearServerData(const ClearParams& params) = 0;
+
// Request that the syncer avoid starting any new tasks and prepare for
// shutdown.
virtual void Stop() = 0;
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.h » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698