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

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: Move syncer_error.* to internal_api/includes Created 8 years, 11 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..d9d397ebc7e42b54d71c9506e2405c2e8e6ce820 100644
--- a/chrome/browser/sync/engine/process_updates_command.cc
+++ b/chrome/browser/sync/engine/process_updates_command.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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 SYNCER_OK; // 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 SYNCER_OK;
}
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