summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine/syncer.cc
diff options
context:
space:
mode:
authortim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-02 04:17:38 +0000
committertim@chromium.org <tim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-02 04:17:38 +0000
commit3d807d391319ce5b97e75c77a131c802fe184ccc (patch)
treea77da2bde1330e94e1b9e165f3d2ea32b8f84e63 /chrome/browser/sync/engine/syncer.cc
parent2f6d64de8b337131d31aa488eed54a353e241e16 (diff)
downloadchromium_src-3d807d391319ce5b97e75c77a131c802fe184ccc.zip
chromium_src-3d807d391319ce5b97e75c77a131c802fe184ccc.tar.gz
chromium_src-3d807d391319ce5b97e75c77a131c802fe184ccc.tar.bz2
sync: add CleanupDisabledTypesCommand to purge data pertaining to previously
synced data types that the user has disabled. Despite my attempt at simplifying the purge code in Directory[BackingStore], I had to go back to my first attempt with DeleteEntries (which was previously reviewed separately), with a few extra gotchas in Directory::PurgeEntriesWithTypeIn. BUG=40252 TEST=CleanupDisabledTypesCommandTest, SyncableDirectoryTest, DirectoryBackingStoreTest Review URL: http://codereview.chromium.org/2865022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/syncer.cc')
-rw-r--r--chrome/browser/sync/engine/syncer.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/sync/engine/syncer.cc b/chrome/browser/sync/engine/syncer.cc
index 2956a04..b3608c6 100644
--- a/chrome/browser/sync/engine/syncer.cc
+++ b/chrome/browser/sync/engine/syncer.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/sync/engine/apply_updates_command.h"
#include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h"
#include "chrome/browser/sync/engine/build_commit_command.h"
+#include "chrome/browser/sync/engine/cleanup_disabled_types_command.h"
#include "chrome/browser/sync/engine/conflict_resolver.h"
#include "chrome/browser/sync/engine/download_updates_command.h"
#include "chrome/browser/sync/engine/get_commit_ids_command.h"
@@ -119,8 +120,15 @@ void Syncer::SyncShare(sessions::SyncSession* session,
switch (current_step) {
case SYNCER_BEGIN:
LOG(INFO) << "Syncer Begin";
+ next_step = CLEANUP_DISABLED_TYPES;
+ break;
+ case CLEANUP_DISABLED_TYPES: {
+ LOG(INFO) << "Cleaning up disabled types";
+ CleanupDisabledTypesCommand cleanup;
+ cleanup.Execute(session);
next_step = DOWNLOAD_UPDATES;
break;
+ }
case DOWNLOAD_UPDATES: {
LOG(INFO) << "Downloading Updates";
DownloadUpdatesCommand download_updates;