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

Side by Side Diff: sync/protocol/sync.proto

Issue 10916174: Implement a bag of chips for sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 456
457 // Whether to create the mobile bookmarks folder if it's not 457 // Whether to create the mobile bookmarks folder if it's not
458 // already created. Should be set to true only by mobile clients. 458 // already created. Should be set to true only by mobile clients.
459 optional bool create_mobile_bookmarks_folder = 1000 [default = false]; 459 optional bool create_mobile_bookmarks_folder = 1000 [default = false];
460 }; 460 };
461 461
462 message AuthenticateMessage { 462 message AuthenticateMessage {
463 required string auth_token = 1; 463 required string auth_token = 1;
464 }; 464 };
465 465
466 // Opaque data used by the server to track the client with.
467 message ChipBag {
468 };
469
466 message ClientToServerMessage { 470 message ClientToServerMessage {
467 required string share = 1; 471 required string share = 1;
468 optional int32 protocol_version = 2 [default = 31]; 472 optional int32 protocol_version = 2 [default = 31];
469 enum Contents { 473 enum Contents {
470 COMMIT = 1; 474 COMMIT = 1;
471 GET_UPDATES = 2; 475 GET_UPDATES = 2;
472 AUTHENTICATE = 3; 476 AUTHENTICATE = 3;
473 CLEAR_DATA = 4; 477 CLEAR_DATA = 4;
474 } 478 }
475 479
476 required Contents message_contents = 3; 480 required Contents message_contents = 3;
477 optional CommitMessage commit = 4; 481 optional CommitMessage commit = 4;
478 optional GetUpdatesMessage get_updates = 5; 482 optional GetUpdatesMessage get_updates = 5;
479 optional AuthenticateMessage authenticate = 6; 483 optional AuthenticateMessage authenticate = 6;
480 484
481 // Request to clear all Chromium data from the server. 485 // Request to clear all Chromium data from the server.
482 // DEPRECATED - this field was never used in production. 486 // DEPRECATED - this field was never used in production.
483 // optional ClearUserDataMessage clear_user_data = 9; 487 // optional ClearUserDataMessage clear_user_data = 9;
484 488
485 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! 489 optional string store_birthday = 7; // Opaque store ID; if it changes, duck!
486 // The client sets this if it detects a sync issue. The server will tell it 490 // The client sets this if it detects a sync issue. The server will tell it
487 // if it should perform a refresh. 491 // if it should perform a refresh.
488 optional bool sync_problem_detected = 8 [default = false]; 492 optional bool sync_problem_detected = 8 [default = false];
489 493
490 // Client side state information for debugging purpose. 494 // Client side state information for debugging purpose.
491 // This is only sent on the first getupdates of every sync cycle, 495 // This is only sent on the first getupdates of every sync cycle,
492 // as an optimization to save bandwidth. 496 // as an optimization to save bandwidth.
493 optional DebugInfo debug_info = 10; 497 optional DebugInfo debug_info = 10;
498
499 // Per-client state for use by the server. Sent with every message sent to the
500 // server.
501 optional ChipBag bag_of_chips = 11;
494 }; 502 };
495 503
496 message CommitResponse { 504 message CommitResponse {
497 enum ResponseType { 505 enum ResponseType {
498 SUCCESS = 1; 506 SUCCESS = 1;
499 CONFLICT = 2; // You're out of date; update and check your data 507 CONFLICT = 2; // You're out of date; update and check your data
500 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? 508 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR?
501 RETRY = 3; // Someone has a conflicting, non-expired session open 509 RETRY = 3; // Someone has a conflicting, non-expired session open
502 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again 510 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again
503 // won't help. 511 // won't help.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; 679 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN];
672 optional string error_description = 2; 680 optional string error_description = 2;
673 optional string url = 3; 681 optional string url = 3;
674 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; 682 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION];
675 683
676 // Currently only meaningful if |error_type| is throttled. If this field 684 // Currently only meaningful if |error_type| is throttled. If this field
677 // is absent then the whole client (all datatypes) is throttled. 685 // is absent then the whole client (all datatypes) is throttled.
678 repeated int32 error_data_type_ids = 5; 686 repeated int32 error_data_type_ids = 5;
679 } 687 }
680 optional Error error = 13; 688 optional Error error = 13;
689
690 // The new per-client state for this client. If set, should be persisted and
691 // sent with any subsequent ClientToServerMessages
692 optional ChipBag new_bag_of_chips = 14;
681 }; 693 };
682 694
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698