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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Sync protocol for communication between sync client and server. 5 // Sync protocol for communication between sync client and server.
6 6
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change
8 // any fields in this file. 8 // any fields in this file.
9 9
10 syntax = "proto2"; 10 syntax = "proto2";
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Supplies a numeric position for this item, relative to other items with 173 // Supplies a numeric position for this item, relative to other items with
174 // the same parent. 174 // the same parent.
175 // 175 //
176 // Present in both GetUpdatesResponse and CommitMessage. 176 // Present in both GetUpdatesResponse and CommitMessage.
177 // 177 //
178 // In a CommitMessage context, server implementations may choose whether 178 // In a CommitMessage context, server implementations may choose whether
179 // to compute a position based on this field or based on 179 // to compute a position based on this field or based on
180 // |insert_after_item_id|. Clients should set both values so that they 180 // |insert_after_item_id|. Clients should set both values so that they
181 // result in a consistent ordering regardless of which choice the server 181 // result in a consistent ordering regardless of which choice the server
182 // makes. 182 // makes.
183 //
184 // This is deprecated: clients should set |ordinal_in_parent|
185 // instead. In the interim, clients should supply both
186 // |ordinal_in_parent| and |position_in_parent| and continue to honor the
187 // |ordinal_in_parent| value returned in the CommitResponse.
188 //
189 // When both |ordinal_in_parent| and |position_in_parent| are set,
190 // the first 8 bytes of |ordinal_in_parent| should be equal to
191 // the bytes of |position_in_parent| in big-endian order (MSB first).
ncarter (slow) 2012/02/09 00:54:47 Since these values are signed, I believe the follo
akalin 2012/02/09 01:10:23 You're right. Clarified comment.
183 optional int64 position_in_parent = 15; 192 optional int64 position_in_parent = 15;
184 193
185 // Contains the ID of the element (under the same parent) after which this 194 // Contains the ID of the element (under the same parent) after which this
186 // element resides. An empty string indicates that the element is the first 195 // element resides. An empty string indicates that the element is the first
187 // element in the parent. This value is used during commits to specify 196 // element in the parent. This value is used during commits to specify
188 // a relative position for a position change. In the context of 197 // a relative position for a position change. In the context of
189 // a GetUpdatesMessage, |position_in_parent| is used instead to 198 // a GetUpdatesMessage, |position_in_parent| is used instead to
190 // communicate position. 199 // communicate position.
191 // 200 //
192 // Present only in CommitMessage. 201 // Present only in CommitMessage.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // c) Client tag - If client committed the item as unique 257 // c) Client tag - If client committed the item as unique
249 // 258 //
250 // May be present in CommitMessages for the initial creation of an entity. 259 // May be present in CommitMessages for the initial creation of an entity.
251 // If present in Commit updates for the entity, it will be ignored. 260 // If present in Commit updates for the entity, it will be ignored.
252 // 261 //
253 // Available in version 24+. 262 // Available in version 24+.
254 // 263 //
255 // May be returned in GetUpdatesMessage and sent up in CommitMessage. 264 // May be returned in GetUpdatesMessage and sent up in CommitMessage.
256 // 265 //
257 optional string client_defined_unique_tag = 23; 266 optional string client_defined_unique_tag = 23;
267
268 // Supplies an ordinal for this item, relative to other items with the
269 // same parent. Ordinals are ordered lexicographically bytewise.
270 //
271 // Available in version 31+.
272 //
273 // Present in both GetUpdatesResponse and CommitMessage.
274 //
275 // In a CommitMessage context, server implementations may choose whether
276 // to compute a position based on this field, |position_in_parent|, or
277 // |insert_after_item_id|. Clients should set all values so that they
278 // result in a consistent ordering regardless of which choice the server
279 // makes.
280 optional bytes ordinal_in_parent = 24;
258 }; 281 };
259 282
260 // This message contains diagnostic information used to correlate 283 // This message contains diagnostic information used to correlate
261 // commit-related traffic with extensions-related mutations to the 284 // commit-related traffic with extensions-related mutations to the
262 // data models in chromium. It plays no functional role in 285 // data models in chromium. It plays no functional role in
263 // processing this CommitMessage. 286 // processing this CommitMessage.
264 message ChromiumExtensionsActivity { 287 message ChromiumExtensionsActivity {
265 // The human-readable ID identifying the extension responsible 288 // The human-readable ID identifying the extension responsible
266 // for the traffic reported in this ChromiumExtensionsActivity. 289 // for the traffic reported in this ChromiumExtensionsActivity.
267 optional string extension_id = 1; 290 optional string extension_id = 1;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // response is returned to the client indicating that the server has received 440 // response is returned to the client indicating that the server has received
418 // the request and has begun to clear data. 441 // the request and has begun to clear data.
419 message ClearUserDataMessage { 442 message ClearUserDataMessage {
420 } 443 }
421 444
422 message ClearUserDataResponse { 445 message ClearUserDataResponse {
423 } 446 }
424 447
425 message ClientToServerMessage { 448 message ClientToServerMessage {
426 required string share = 1; 449 required string share = 1;
427 optional int32 protocol_version = 2 [default = 30]; 450 optional int32 protocol_version = 2 [default = 31];
428 enum Contents { 451 enum Contents {
429 COMMIT = 1; 452 COMMIT = 1;
430 GET_UPDATES = 2; 453 GET_UPDATES = 2;
431 AUTHENTICATE = 3; 454 AUTHENTICATE = 3;
432 CLEAR_DATA = 4; 455 CLEAR_DATA = 4;
433 } 456 }
434 457
435 required Contents message_contents = 3; 458 required Contents message_contents = 3;
436 optional CommitMessage commit = 4; 459 optional CommitMessage commit = 4;
437 optional GetUpdatesMessage get_updates = 5; 460 optional GetUpdatesMessage get_updates = 5;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 508
486 // This name is the same as the non_unique_name field returned within the 509 // This name is the same as the non_unique_name field returned within the
487 // SyncEntity message in GetUpdatesResponse. 510 // SyncEntity message in GetUpdatesResponse.
488 optional string non_unique_name = 8; 511 optional string non_unique_name = 8;
489 512
490 optional string error_message = 9; 513 optional string error_message = 9;
491 514
492 // Last modification time (in java time milliseconds). Allows the server 515 // Last modification time (in java time milliseconds). Allows the server
493 // to override the client-supplied mtime during a commit operation. 516 // to override the client-supplied mtime during a commit operation.
494 optional int64 mtime = 10; 517 optional int64 mtime = 10;
518
519 // This value is the same as the ordinal_in_parent value returned within
520 // the SyncEntity message in GetUpdatesResponse.
521 optional bytes ordinal_in_parent = 11;
495 } 522 }
496 }; 523 };
497 524
498 message GetUpdatesResponse { 525 message GetUpdatesResponse {
499 // New sync entries that the client should apply. 526 // New sync entries that the client should apply.
500 repeated SyncEntity entries = 1; 527 repeated SyncEntity entries = 1;
501 528
502 // If there are more changes on the server that weren't processed during this 529 // If there are more changes on the server that weren't processed during this
503 // GetUpdates request, the client should send another GetUpdates request and 530 // GetUpdates request, the client should send another GetUpdates request and
504 // use new_timestamp as the from_timestamp value within GetUpdatesMessage. 531 // use new_timestamp as the from_timestamp value within GetUpdatesMessage.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 optional string store_birthday = 6; 664 optional string store_birthday = 6;
638 665
639 optional ClientCommand client_command = 7; 666 optional ClientCommand client_command = 7;
640 optional ProfilingData profiling_data = 8; 667 optional ProfilingData profiling_data = 8;
641 668
642 // The data types whose storage has been migrated. Present when the value of 669 // The data types whose storage has been migrated. Present when the value of
643 // error_code is MIGRATION_DONE. 670 // error_code is MIGRATION_DONE.
644 repeated int32 migrated_data_type_id = 12; 671 repeated int32 migrated_data_type_id = 12;
645 }; 672 };
646 673
OLDNEW
« 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