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

Unified Diff: chrome/browser/sync/engine/process_updates_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/process_updates_command.cc
diff --git a/chrome/browser/sync/engine/process_updates_command.cc b/chrome/browser/sync/engine/process_updates_command.cc
index 47812502e02d3821bda3d5085cb633b8222153da..05e1ad05b429488109dfcd7f9e602be1fe9bb021 100644
--- a/chrome/browser/sync/engine/process_updates_command.cc
+++ b/chrome/browser/sync/engine/process_updates_command.cc
@@ -32,18 +32,19 @@ std::set<ModelSafeGroup> ProcessUpdatesCommand::GetGroupsToChange(
return session.GetEnabledGroupsWithVerifiedUpdates();
}
-void ProcessUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) {
+SyncerError ProcessUpdatesCommand::ModelChangingExecuteImpl(
+ SyncSession* session) {
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;
}
const sessions::UpdateProgress* progress =
session->status_controller().update_progress();
if (!progress)
- return; // Nothing to do.
+ return NO_ERROR; // Nothing to do.
syncable::WriteTransaction trans(FROM_HERE, syncable::SYNCER, dir);
vector<sessions::VerifiedUpdate>::const_iterator it;
@@ -67,6 +68,7 @@ void ProcessUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) {
StatusController* status = session->mutable_status_controller();
status->set_num_consecutive_errors(0);
status->mutable_update_progress()->ClearVerifiedUpdates();
+ return NO_ERROR;
}
namespace {
« no previous file with comments | « chrome/browser/sync/engine/process_updates_command.h ('k') | chrome/browser/sync/engine/resolve_conflicts_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698