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

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

Issue 9305001: sync: Remove the remaining conflict sets code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames, refactors and fixes 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/syncer_types.h
diff --git a/chrome/browser/sync/engine/syncer_types.h b/chrome/browser/sync/engine/syncer_types.h
index e4fde71467aee67f013160080d09c025aa73b295..0d422c0f69418078fda049d0b2607b937b8b9571 100644
--- a/chrome/browser/sync/engine/syncer_types.h
+++ b/chrome/browser/sync/engine/syncer_types.h
@@ -30,15 +30,36 @@ enum UpdateAttemptResponse {
// Update was applied or safely ignored.
SUCCESS,
- // Conflicts with the local data representation. This can also mean that the
- // entry doesn't currently make sense if we applied it.
- CONFLICT,
+ // The conditions described by the following enum values are not mutually
+ // exclusive. The list has been ordered according to priority in the case of
+ // overlap, with highest priority first.
+ //
+ // For example, in the case where an item had both the IS_UNSYCNED and
+ // IS_UNAPPLIED_UPDATE flags set (CONFLICT_SIMPLE), and a SERVER_PARENT_ID
+ // that, if applied, would cause a directory loop (CONFLICT_HIERARCHY), and
+ // specifics that we can't decrypt right now (CONFLICT_ENCRYPTION), the
+ // UpdateApplicator would return CONFLICT_ENCRYPTION when attempting to
+ // process the item.
+ //
+ // We do not attempt to resolve CONFLICT_HIERARCHY or CONFLICT_ENCRYPTION
+ // items. We will leave these updates unapplied and wait for the server
+ // to send us newer updates that will resolve the conflict.
// We were unable to decrypt/encrypt this server data. As such, we can't make
// 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,
+
+ // These are some updates that, if applied, would violate the tree's
+ // invariants. Examples of this include the server adding children to locally
+ // deleted directories and directory moves that would create loops.
+ CONFLICT_HIERARCHY,
+
+ // This indicates that item was modified both remotely (IS_UNAPPLIED_UPDATE)
+ // and locally (IS_UNSYNCED). We use the ConflictResolver to decide which of
+ // the changes should take priority, or if we can possibly merge the data.
+ CONFLICT_SIMPLE
};
enum ServerUpdateProcessingResult {
@@ -132,14 +153,6 @@ class SyncEngineEventListener {
virtual ~SyncEngineEventListener() {}
};
-// This struct is passed between parts of the syncer during the processing of
-// one sync loop. It lives on the stack. We don't expose the number of
-// conflicts during SyncShare as the conflicts may be solved automatically
-// by the conflict resolver.
-typedef std::vector<syncable::Id> ConflictSet;
-
-typedef std::map<syncable::Id, ConflictSet*> IdToConflictSetMap;
-
} // namespace browser_sync
#endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_TYPES_H_

Powered by Google App Engine
This is Rietveld 408576698