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

Unified Diff: chrome/browser/sync/engine/cleanup_disabled_types_command.cc

Issue 9036003: Avoid useless SYNC_CYCLE_CONTINUATION sync cycle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
Index: chrome/browser/sync/engine/cleanup_disabled_types_command.cc
diff --git a/chrome/browser/sync/engine/cleanup_disabled_types_command.cc b/chrome/browser/sync/engine/cleanup_disabled_types_command.cc
index 49a0fda04acb3a7b7df7bf86a0bdaad27c7f460f..b1de7f5c076a088400726a19147e0c9d1c5c8da3 100644
--- a/chrome/browser/sync/engine/cleanup_disabled_types_command.cc
+++ b/chrome/browser/sync/engine/cleanup_disabled_types_command.cc
@@ -17,10 +17,10 @@ namespace browser_sync {
CleanupDisabledTypesCommand::CleanupDisabledTypesCommand() {}
CleanupDisabledTypesCommand::~CleanupDisabledTypesCommand() {}
-void CleanupDisabledTypesCommand::ExecuteImpl(sessions::SyncSession* session) {
+SyncerError CleanupDisabledTypesCommand::ExecuteImpl(
+ sessions::SyncSession* session) {
using syncable::ModelTypeSet;
using syncable::ModelTypeSetToString;
-
// Because a full directory purge is slow, we avoid purging
// undesired types unless we have reason to believe they were
// previously enabled. Because purging could theoretically fail on
@@ -61,16 +61,17 @@ void CleanupDisabledTypesCommand::ExecuteImpl(sessions::SyncSession* session) {
<< ", to_cleanup = " << ModelTypeSetToString(to_cleanup);
if (to_cleanup.Empty())
- return;
+ return NO_ERROR;
syncable::ScopedDirLookup dir(session->context()->directory_manager(),
session->context()->account_name());
if (!dir.good()) {
LOG(ERROR) << "Scoped dir lookup failed!";
- return;
+ return DIRECTORY_LOOKUP_FAILED;
}
dir->PurgeEntriesWithTypeIn(to_cleanup);
+ return NO_ERROR;
}
} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/engine/cleanup_disabled_types_command.h ('k') | chrome/browser/sync/engine/clear_data_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698