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

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

Issue 8366030: Introduce the plumbing necessary to report Unrecoverable error from model safe workers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For a high level review. Created 9 years, 2 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/apply_updates_command.cc
diff --git a/chrome/browser/sync/engine/apply_updates_command.cc b/chrome/browser/sync/engine/apply_updates_command.cc
index 6d1f9583da1db07b210a81b2bc5231cbeba0a035..ba7eed8fe141ae6455f26fb6be6f6768a569fa40 100644
--- a/chrome/browser/sync/engine/apply_updates_command.cc
+++ b/chrome/browser/sync/engine/apply_updates_command.cc
@@ -34,6 +34,18 @@ void ApplyUpdatesCommand::ModelChangingExecuteImpl(SyncSession* session) {
handles.begin(), handles.end(), session->routing_info(),
session->status_controller()->group_restriction());
while (applicator.AttemptOneApplication(&trans)) {}
+
+ if (applicator.failed_update()) {
+ // TODO(lipalani): Pipe in the failed line number from the syncable layer.
+
+ // We could be in any thread here. So set the unrecoverable error in.
+ // session. ModelChangingSyncerCommand object will send it on the right
+ // thread.
+ session->SetUnrecoverableError(FROM_HERE, "Failed to apply update.",
+ &trans);
+ return;
+ }
+
applicator.SaveProgressIntoSessionState(
session->status_controller()->mutable_conflict_progress(),
session->status_controller()->mutable_update_progress());

Powered by Google App Engine
This is Rietveld 408576698