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; |
} |
}; |