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

Unified Diff: chrome/browser/sync/engine/syncer_types.h

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/syncer_types.h
diff --git a/chrome/browser/sync/engine/syncer_types.h b/chrome/browser/sync/engine/syncer_types.h
index 54d4b3e2974d295d9c50e17bd5db956f11a6bcf8..9563c1182272cb812bf846c446f3cfd851b2177e 100644
--- a/chrome/browser/sync/engine/syncer_types.h
+++ b/chrome/browser/sync/engine/syncer_types.h
@@ -10,7 +10,9 @@
#include <string>
#include <vector>
+#include "base/location.h"
#include "base/observer_list.h"
+#include "chrome/browser/sync/sessions/unrecoverable_error_info.h"
#include "chrome/browser/sync/syncable/model_type.h"
namespace syncable {
@@ -39,7 +41,10 @@ enum UpdateAttemptResponse {
// forward progress on this node, but because the passphrase may not arrive
// until later we don't want to get the syncer stuck. See UpdateApplicator
// for how this is handled.
- CONFLICT_ENCRYPTION
+ CONFLICT_ENCRYPTION,
+
+ // Failed to apply the update because of an error.
+ FAILED_UPDATE
};
enum ServerUpdateProcessingResult {
@@ -109,13 +114,24 @@ struct SyncEngineEvent {
// This event is sent when we receive an actionable error. It is upto
// the listeners to figure out the action to take using the snapshot sent.
ACTIONABLE_ERROR,
+
+ // This event is sent when syncer receives an unrecoverable error.
+ UNRECOVERABLE_ERROR,
};
explicit SyncEngineEvent(EventCause cause);
+
+ // Use this constructor in case of unrecoverable error.
+ SyncEngineEvent(
+ const tracked_objects::Location& unrecoverable_error_location,
+ const std::string& message);
~SyncEngineEvent();
EventCause what_happened;
+ // Bookkeeping for unrecoverable errors.
+ sessions::UnrecoverableErrorInfo unrecoverable_error_info;
+
// The last session used for syncing.
const sessions::SyncSessionSnapshot* snapshot;

Powered by Google App Engine
This is Rietveld 408576698