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

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

Issue 9113024: Add return values to SyncerCommand (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 12 months 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 7ab56d5b9a63be98bf7e7dc3bcb6b036e16f8d7a..815247f5dc9a9a3ad4b85bf812d714c61832ec5d 100644
--- a/chrome/browser/sync/engine/process_updates_command.cc
+++ b/chrome/browser/sync/engine/process_updates_command.cc
@@ -33,18 +33,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;
@@ -70,6 +71,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 {

Powered by Google App Engine
This is Rietveld 408576698