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

Unified Diff: chrome/browser/sync/engine/model_changing_syncer_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/model_changing_syncer_command.cc
diff --git a/chrome/browser/sync/engine/model_changing_syncer_command.cc b/chrome/browser/sync/engine/model_changing_syncer_command.cc
index 1c392cbd20877ecfc27fa47abddc076dd2627361..da59a5117b361c0537de28a4922fbaf3528c8f61 100644
--- a/chrome/browser/sync/engine/model_changing_syncer_command.cc
+++ b/chrome/browser/sync/engine/model_changing_syncer_command.cc
@@ -9,14 +9,16 @@
#include "base/bind_helpers.h"
#include "chrome/browser/sync/sessions/status_controller.h"
#include "chrome/browser/sync/sessions/sync_session.h"
-#include "chrome/browser/sync/util/unrecoverable_error_info.h"
namespace browser_sync {
-void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) {
+SyncerError ModelChangingSyncerCommand::ExecuteImpl(
+ sessions::SyncSession* session) {
work_session_ = session;
- if (!ModelNeutralExecuteImpl(work_session_)) {
- return;
+ SyncerError result = ModelNeutralExecuteImpl(work_session_);
+
+ if (result != NO_ERROR) {
+ return result;
}
const std::set<ModelSafeGroup>& groups_to_change =
@@ -40,15 +42,19 @@ void ModelChangingSyncerCommand::ExecuteImpl(sessions::SyncSession* session) {
// unretained.
base::Unretained(this));
- // TODO(lipalani): Check the return value for an unrecoverable error.
- ignore_result(worker->DoWorkAndWaitUntilDone(c));
-
+ SyncerError this_worker_result = worker->DoWorkAndWaitUntilDone(c);
+ // TODO(rlarocque): Figure out a better way to deal with errors from
+ // multiple models at once.
+ if (this_worker_result != NO_ERROR)
+ result = this_worker_result;
}
+
+ return result;
}
-bool ModelChangingSyncerCommand::ModelNeutralExecuteImpl(
+SyncerError ModelChangingSyncerCommand::ModelNeutralExecuteImpl(
sessions::SyncSession* session) {
- return true;
+ return NO_ERROR;
}
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698