diff options
author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 01:31:36 +0000 |
---|---|---|
committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 01:31:36 +0000 |
commit | 7f8abea4d5728b1b94fe38702a0021e2e4a82abb (patch) | |
tree | 19a2cb9608ffe226b63b75d0e9c74def324d1f8c /chrome/browser/sync/sessions | |
parent | fd013932faa095a8384dd183874fe7a2ee6986d5 (diff) | |
download | chromium_src-7f8abea4d5728b1b94fe38702a0021e2e4a82abb.zip chromium_src-7f8abea4d5728b1b94fe38702a0021e2e4a82abb.tar.gz chromium_src-7f8abea4d5728b1b94fe38702a0021e2e4a82abb.tar.bz2 |
Handle birthday errors by disabling sync and deleting sync data. Also added some CV broadcasts in SyncerThread, as changing vault_ fields and not signalling seems dubious (and I caught a hang in the debugger where the thread was waiting for an already true condition, thus deadlocked).
BUG=46807,39070
Review URL: http://codereview.chromium.org/2923006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/sessions')
-rw-r--r-- | chrome/browser/sync/sessions/sync_session.h | 6 | ||||
-rw-r--r-- | chrome/browser/sync/sessions/sync_session_unittest.cc | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/sync/sessions/sync_session.h b/chrome/browser/sync/sessions/sync_session.h index 6f29227..dd498fe 100644 --- a/chrome/browser/sync/sessions/sync_session.h +++ b/chrome/browser/sync/sessions/sync_session.h @@ -65,6 +65,12 @@ class SyncSession { virtual void OnReceivedLongPollIntervalUpdate( const base::TimeDelta& new_interval) = 0; + // The client needs to cease and desist syncing at once. This occurs when + // the Syncer detects that the backend store has fundamentally changed or + // is a different instance altogether (e.g. swapping from a test instance + // to production, or a global stop syncing operation has wiped the store). + virtual void OnShouldStopSyncingPermanently() = 0; + protected: virtual ~Delegate() {} }; diff --git a/chrome/browser/sync/sessions/sync_session_unittest.cc b/chrome/browser/sync/sessions/sync_session_unittest.cc index ae85137..2bc4594 100644 --- a/chrome/browser/sync/sessions/sync_session_unittest.cc +++ b/chrome/browser/sync/sessions/sync_session_unittest.cc @@ -50,6 +50,9 @@ class SyncSessionTest : public testing::Test, const base::TimeDelta& new_interval) { FailControllerInvocationIfDisabled("OnReceivedShortPollIntervalUpdate"); } + virtual void OnShouldStopSyncingPermanently() { + FailControllerInvocationIfDisabled("OnShouldStopSyncingPermanently"); + } // ModelSafeWorkerRegistrar implementation. virtual void GetWorkers(std::vector<ModelSafeWorker*>* out) {} |