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

Unified Diff: sync/engine/process_updates_command.cc

Issue 10989063: Changed DB to store node positions as Ordinals. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed memory leak error in unittest Created 8 years, 2 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/process_commit_response_command.cc ('k') | sync/engine/syncer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/process_updates_command.cc
diff --git a/sync/engine/process_updates_command.cc b/sync/engine/process_updates_command.cc
index de6be0f64a5aa3ae925e014d4449a326c6fa4231..0bf03f161a418bb02e34793a82b80d7b447a271a 100644
--- a/sync/engine/process_updates_command.cc
+++ b/sync/engine/process_updates_command.cc
@@ -19,6 +19,11 @@
#include "sync/syncable/write_transaction.h"
#include "sync/util/cryptographer.h"
+// TODO(vishwath): Remove this include after node positions have
+// shifted to completely using Ordinals.
+// See http://crbug.com/145412 .
+#include "sync/internal_api/public/base/node_ordinal.h"
+
using std::vector;
namespace syncer {
@@ -152,7 +157,8 @@ ServerUpdateProcessingResult ProcessUpdatesCommand::ProcessUpdate(
(SyncableIdFromProto(update.parent_id_string()) ==
target_entry.Get(syncable::SERVER_PARENT_ID)) &&
(update.position_in_parent() ==
- target_entry.Get(syncable::SERVER_POSITION_IN_PARENT)) &&
+ NodeOrdinalToInt64(
+ target_entry.Get(syncable::SERVER_ORDINAL_IN_PARENT))) &&
update.has_specifics() && update.specifics().has_encrypted() &&
!cryptographer->CanDecrypt(update.specifics().encrypted())) {
sync_pb::EntitySpecifics prev_specifics =
« no previous file with comments | « sync/engine/process_commit_response_command.cc ('k') | sync/engine/syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698