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

Unified Diff: chrome/browser/sync/engine/update_applicator.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/update_applicator.cc
diff --git a/chrome/browser/sync/engine/update_applicator.cc b/chrome/browser/sync/engine/update_applicator.cc
index 60f2c36aeb353c79365a4920d821a2b3aeebf849..fa32fc64c1cd69e902dc5b5e44bfac2b1e6e0011 100644
--- a/chrome/browser/sync/engine/update_applicator.cc
+++ b/chrome/browser/sync/engine/update_applicator.cc
@@ -79,6 +79,9 @@ bool UpdateApplicator::AttemptOneApplication(
pointer_++;
application_results_.AddEncryptionConflict(entry.Get(syncable::ID));
break;
+ case FAILED_UPDATE:
+ application_results_.set_failed_update();
+ return false;
default:
NOTREACHED();
break;
@@ -126,7 +129,12 @@ void UpdateApplicator::SaveProgressIntoSessionState(
application_results_.SaveProgress(conflict_progress, update_progress);
}
-UpdateApplicator::ResultTracker::ResultTracker(size_t num_results) {
+bool UpdateApplicator::failed_update() const {
+ return application_results_.failed_udpate();
+}
+
+UpdateApplicator::ResultTracker::ResultTracker(size_t num_results) :
+ failed_update_(false) {
successful_ids_.reserve(num_results);
}
@@ -145,6 +153,14 @@ void UpdateApplicator::ResultTracker::AddSuccess(syncable::Id id) {
successful_ids_.push_back(id);
}
+void UpdateApplicator::ResultTracker::set_failed_update() {
+ failed_update_ = true;
+}
+
+bool UpdateApplicator::ResultTracker::failed_udpate() const {
+ return failed_update_;
+}
+
void UpdateApplicator::ResultTracker::SaveProgress(
sessions::ConflictProgress* conflict_progress,
sessions::UpdateProgress* update_progress) {

Powered by Google App Engine
This is Rietveld 408576698