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

Unified Diff: sync/engine/conflict_resolver.cc

Issue 11637053: sync: Start moving away from PREV_ID and NEXT_ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
« no previous file with comments | « sync/engine/build_commit_command.cc ('k') | sync/engine/get_commit_ids_command.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/conflict_resolver.cc
diff --git a/sync/engine/conflict_resolver.cc b/sync/engine/conflict_resolver.cc
index 6e2eddd69bf58671e3be79237f40ada64579045b..5b485a11488da7aa7bd13654b65f388fd97c9d71 100644
--- a/sync/engine/conflict_resolver.cc
+++ b/sync/engine/conflict_resolver.cc
@@ -140,10 +140,10 @@ void ConflictResolver::ProcessSimpleConflict(WriteTransaction* trans,
syncable::Id server_prev_id = entry.ComputePrevIdFromServerPosition(
entry.Get(syncable::SERVER_PARENT_ID));
bool needs_reinsertion = !parent_matches ||
- server_prev_id != entry.Get(syncable::PREV_ID);
+ server_prev_id != entry.GetPredecessorId();
DVLOG_IF(1, needs_reinsertion) << "Insertion needed, server prev id "
<< " is " << server_prev_id << ", local prev id is "
- << entry.Get(syncable::PREV_ID);
+ << entry.GetPredecessorId();
const sync_pb::EntitySpecifics& specifics =
entry.Get(syncable::SPECIFICS);
const sync_pb::EntitySpecifics& server_specifics =
@@ -288,7 +288,7 @@ void ConflictResolver::ResolveConflicts(
Entry entry(trans, syncable::GET_BY_ID, prev_id);
// Any entry in conflict must be valid.
CHECK(entry.good());
- Id new_prev_id = entry.Get(syncable::PREV_ID);
+ Id new_prev_id = entry.GetPredecessorId();
if (new_prev_id == prev_id)
break;
prev_id = new_prev_id;
« no previous file with comments | « sync/engine/build_commit_command.cc ('k') | sync/engine/get_commit_ids_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698