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

Unified Diff: chrome/browser/sync/protocol/sync.proto

Issue 9369005: [Sync] Add ordinal_in_parent to SyncEntity/CommitResponse protobuf (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/protocol/sync.proto
diff --git a/chrome/browser/sync/protocol/sync.proto b/chrome/browser/sync/protocol/sync.proto
index 41ef93302e99faec688e4717b9d228857c8e43f5..2373fcdd55c6fc3b01bdd241e162542b28db6c6d 100644
--- a/chrome/browser/sync/protocol/sync.proto
+++ b/chrome/browser/sync/protocol/sync.proto
@@ -180,6 +180,16 @@ message SyncEntity {
// |insert_after_item_id|. Clients should set both values so that they
// result in a consistent ordering regardless of which choice the server
// makes.
+ //
+ // This is deprecated: clients should set |ordinal_in_parent|
+ // instead. In the interim, clients should supply both
ncarter (slow) 2012/02/09 01:30:58 nit: The phrase "In the interim" made sense when t
+ // |ordinal_in_parent| and |position_in_parent| and continue to honor the
+ // |ordinal_in_parent| value returned in the CommitResponse.
ncarter (slow) 2012/02/09 01:30:58 There is no ordinal_in_parent value returned in th
+ //
+ // When both |ordinal_in_parent| and |position_in_parent| are set,
+ // the first 8 bytes of |ordinal_in_parent| should be equal to
+ // the bytes of flip-sign-bit(|position_in_parent|) in big-endian order
+ // (MSB first).
optional int64 position_in_parent = 15;
ncarter (slow) 2012/02/09 01:30:58 A draft of some possible language about the deprec
// Contains the ID of the element (under the same parent) after which this
@@ -255,6 +265,22 @@ message SyncEntity {
// May be returned in GetUpdatesMessage and sent up in CommitMessage.
//
optional string client_defined_unique_tag = 23;
+
+ // Supplies an ordinal for this item, relative to other items with the
+ // same parent. Ordinals are ordered lexicographically bytewise.
+ // Ordinals must be a least 8 bytes (for backwards compatibility), and
+ // must not be all zeroes.
+ //
+ // Available in version 31+.
+ //
+ // Present in both GetUpdatesResponse and CommitMessage.
+ //
+ // In a CommitMessage context, server implementations may choose whether
+ // to compute a position based on this field, |position_in_parent|, or
+ // |insert_after_item_id|. Clients should set all values so that they
+ // result in a consistent ordering regardless of which choice the server
+ // makes.
+ optional bytes ordinal_in_parent = 24;
};
// This message contains diagnostic information used to correlate
@@ -424,7 +450,7 @@ message ClearUserDataResponse {
message ClientToServerMessage {
required string share = 1;
- optional int32 protocol_version = 2 [default = 30];
+ optional int32 protocol_version = 2 [default = 31];
enum Contents {
COMMIT = 1;
GET_UPDATES = 2;
@@ -492,6 +518,10 @@ message CommitResponse {
// Last modification time (in java time milliseconds). Allows the server
// to override the client-supplied mtime during a commit operation.
optional int64 mtime = 10;
+
+ // This value is the same as the ordinal_in_parent value returned within
+ // the SyncEntity message in GetUpdatesResponse.
+ optional bytes ordinal_in_parent = 11;
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698