summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/glue/sync_backend_host.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync/glue/sync_backend_host.h')
-rw-r--r--chrome/browser/sync/glue/sync_backend_host.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/sync/glue/sync_backend_host.h b/chrome/browser/sync/glue/sync_backend_host.h
index 2b8680d..69759df 100644
--- a/chrome/browser/sync/glue/sync_backend_host.h
+++ b/chrome/browser/sync/glue/sync_backend_host.h
@@ -62,6 +62,10 @@ class SyncFrontend {
// be disabled and state cleaned up at once.
virtual void OnStopSyncingPermanently() = 0;
+ // Called to handle success/failure of clearing server data
+ virtual void OnClearServerDataSucceeded() = 0;
+ virtual void OnClearServerDataFailed() = 0;
+
protected:
// Don't delete through SyncFrontend interface.
virtual ~SyncFrontend() {
@@ -155,6 +159,9 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
// notification is sent to the notification service.
virtual bool RequestResume();
+ // Asks the server to clear all data associated with ChromeSync.
+ virtual bool RequestClearServerData();
+
// Called on |frontend_loop_| to obtain a handle to the UserShare needed
// for creating transactions.
UserShareHandle GetUserShareHandle() const;
@@ -208,6 +215,8 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
virtual void OnPaused();
virtual void OnResumed();
virtual void OnStopSyncingPermanently();
+ virtual void OnClearServerDataFailed();
+ virtual void OnClearServerDataSucceeded();
struct DoInitializeOptions {
DoInitializeOptions(
@@ -275,6 +284,7 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
void DoRequestNudge();
void DoRequestPause();
void DoRequestResume();
+ void DoRequestClearServerData();
// Called on our SyncBackendHost's |core_thread_| to set the passphrase
// on behalf of SyncBackendHost::SupplyPassphrase.
@@ -365,6 +375,10 @@ class SyncBackendHost : public browser_sync::ModelSafeWorkerRegistrar {
void HandleStopSyncingPermanentlyOnFrontendLoop();
+ // Called to handle success/failure of clearing server data
+ void HandleClearServerDataSucceededOnFrontendLoop();
+ void HandleClearServerDataFailedOnFrontendLoop();
+
// Called from Core::OnInitializationComplete to handle updating
// frontend thread components.
void HandleInitalizationCompletedOnFrontendLoop();