summaryrefslogtreecommitdiffstats
path: root/sync/syncable/syncable_util.cc
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-08 22:17:50 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-08 22:17:50 +0000
commitc4d8d38b76de0209e0065f6e5d74e70530721bd8 (patch)
tree58d6ff8ab19730cb382bb9dd3a1aa2783f8c7b58 /sync/syncable/syncable_util.cc
parent68e0007d6f7441ab595848bff24f4d5a9909220c (diff)
downloadchromium_src-c4d8d38b76de0209e0065f6e5d74e70530721bd8.zip
chromium_src-c4d8d38b76de0209e0065f6e5d74e70530721bd8.tar.gz
chromium_src-c4d8d38b76de0209e0065f6e5d74e70530721bd8.tar.bz2
sync: Start moving away from PREV_ID and NEXT_ID
This change replaces serveral instances of Get(PREV_ID) and Get(NEXT_ID) with calls to the newly introduced GetPredecessorId() and GetSuccessorId(). This is done in anticipation of the change that will remove PREV_ID and NEXT_ID entirely. By making this change in advance, that patch will be smaller and easier to review. BUG=145412,126505 Review URL: https://chromiumcodereview.appspot.com/11637053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175599 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/syncable/syncable_util.cc')
-rw-r--r--sync/syncable/syncable_util.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sync/syncable/syncable_util.cc b/sync/syncable/syncable_util.cc
index 0597109..857fc85 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());
}
}