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

Unified Diff: sync/syncable/syncable_util.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/syncable/nigori_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/syncable_util.cc
diff --git a/sync/syncable/syncable_util.cc b/sync/syncable/syncable_util.cc
index 0597109d41b62426c822fd40fce51904d35b69b3..857fc85a66ce892142f3a204bfa74a5ea5db4344 100644
--- a/sync/syncable/syncable_util.cc
+++ b/sync/syncable/syncable_util.cc
@@ -78,14 +78,14 @@ void ChangeEntryIDAndUpdateChildren(
// order. Do this by reinserting into the linked list; the first
// step in PutPredecessor is to Unlink from the existing order, which
// will overwrite the stale Id value from the adjacent nodes.
- if (entry->Get(PREV_ID) == entry->Get(NEXT_ID) &&
- entry->Get(PREV_ID) == old_id) {
+ if (entry->GetPredecessorId() == entry->GetSuccessorId() &&
+ entry->GetPredecessorId() == old_id) {
// We just need a shallow update to |entry|'s fields since it is already
// self looped.
entry->Put(NEXT_ID, new_id);
entry->Put(PREV_ID, new_id);
} else {
- entry->PutPredecessor(entry->Get(PREV_ID));
+ entry->PutPredecessor(entry->GetPredecessorId());
}
}
« no previous file with comments | « sync/syncable/nigori_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698