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

Unified Diff: sync/engine/conflict_util.h

Issue 10832286: sync: Introduce control data types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ToFullModelTypeSet() function Created 8 years, 4 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: sync/engine/conflict_util.h
diff --git a/sync/engine/conflict_util.h b/sync/engine/conflict_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..c3efa5eac0d19ee563cdd8be69bc22c3012eec02
--- /dev/null
+++ b/sync/engine/conflict_util.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Utility functions that act on syncable::MutableEntry to resolve conflicts.
+
+#ifndef SYNC_ENGINE_CONFLICT_UTIL_H_
+#define SYNC_ENGINE_CONFLICT_UTIL_H_
+
+namespace syncable {
+class MutableEntry;
+}
+
+namespace syncer {
+
+// Marks the item as no longer requiring sync, allowing the server's version
+// to 'win' during the next update application step.
+void IgnoreLocalChanges(syncable::MutableEntry* entry);
+
+// Marks the item as no longer requiring update from server data. This will
+// cause the item to be committed to the server, overwriting the server's
+// version.
+void OverwriteServerChanges(syncable::MutableEntry* entry);
+
+// The local and server versions are identical, so unset the bits that put them
+// into a conflicting state.
+void IgnoreConflict(syncable::MutableEntry *trans);
+
+} // namespace syncer
+
+#endif // SYNC_ENGINE_CONFLICT_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698