diff options
| author | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-08 19:07:36 +0000 |
|---|---|---|
| committer | tim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-08 19:07:36 +0000 |
| commit | 1ce52aae084f6a0201c64141e35772fc70bab1f0 (patch) | |
| tree | f1d3ee1f356df34f5746f4659c05b0de5438a808 /chrome/browser/sync/engine/syncapi.cc | |
| parent | af3711395a43fc47aa5882148edc93d9674dcdf1 (diff) | |
| download | chromium_src-1ce52aae084f6a0201c64141e35772fc70bab1f0.zip chromium_src-1ce52aae084f6a0201c64141e35772fc70bab1f0.tar.gz chromium_src-1ce52aae084f6a0201c64141e35772fc70bab1f0.tar.bz2 | |
Implements the backend for clearing data from the server
BUG=54280
TEST=accessible only via unit test checked in this CL
Original patch by raz@chromium.org
Original review: http://codereview.chromium.org/3293007
Review URL: http://codereview.chromium.org/3310018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncapi.cc')
| -rw-r--r-- | chrome/browser/sync/engine/syncapi.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/sync/engine/syncapi.cc b/chrome/browser/sync/engine/syncapi.cc index 00d1c4f..a0b5f29 100644 --- a/chrome/browser/sync/engine/syncapi.cc +++ b/chrome/browser/sync/engine/syncapi.cc @@ -1329,6 +1329,10 @@ void SyncManager::RequestNudge() { data_->syncer_thread()->NudgeSyncer(0, SyncerThread::kLocal); } +void SyncManager::RequestClearServerData() { + data_->syncer_thread()->NudgeSyncer(0, SyncerThread::kClearPrivateData); +} + const std::string& SyncManager::GetAuthenticatedUsername() { DCHECK(data_); return data_->username_for_share(); @@ -1981,6 +1985,16 @@ void SyncManager::SyncInternal::HandleChannelEvent(const SyncerEvent& event) { observer_->OnStopSyncingPermanently(); return; } + + if (event.what_happened == SyncerEvent::CLEAR_SERVER_DATA_SUCCEEDED) { + observer_->OnClearServerDataSucceeded(); + return; + } + + if (event.what_happened == SyncerEvent::CLEAR_SERVER_DATA_FAILED) { + observer_->OnClearServerDataFailed(); + return; + } } void SyncManager::SyncInternal::HandleAuthWatcherEvent( |
