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

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

Issue 8595023: [Sync] Parse and save per-data type throttle data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 // response is returned to the client indicating that the server has received 413 // response is returned to the client indicating that the server has received
414 // the request and has begun to clear data. 414 // the request and has begun to clear data.
415 message ClearUserDataMessage { 415 message ClearUserDataMessage {
416 } 416 }
417 417
418 message ClearUserDataResponse { 418 message ClearUserDataResponse {
419 } 419 }
420 420
421 message ClientToServerMessage { 421 message ClientToServerMessage {
422 required string share = 1; 422 required string share = 1;
423 optional int32 protocol_version = 2 [default = 29]; 423 optional int32 protocol_version = 2 [default = 30];
424 enum Contents { 424 enum Contents {
425 COMMIT = 1; 425 COMMIT = 1;
426 GET_UPDATES = 2; 426 GET_UPDATES = 2;
427 AUTHENTICATE = 3; 427 AUTHENTICATE = 3;
428 CLEAR_DATA = 4; 428 CLEAR_DATA = 4;
429 } 429 }
430 430
431 required Contents message_contents = 3; 431 required Contents message_contents = 3;
432 optional CommitMessage commit = 4; 432 optional CommitMessage commit = 4;
433 optional GetUpdatesMessage get_updates = 5; 433 optional GetUpdatesMessage get_updates = 5;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 // Google Account. 620 // Google Account.
621 AUTH_INVALID = 6; // Auth token or cookie is otherwise invalid. 621 AUTH_INVALID = 6; // Auth token or cookie is otherwise invalid.
622 CLEAR_PENDING = 7; // A clear of the user data is pending (e.g. 622 CLEAR_PENDING = 7; // A clear of the user data is pending (e.g.
623 // initiated by privacy request). Client should 623 // initiated by privacy request). Client should
624 // come back later. 624 // come back later.
625 TRANSIENT_ERROR = 8; // A transient error occured (eg. backend 625 TRANSIENT_ERROR = 8; // A transient error occured (eg. backend
626 // timeout). Client should try again later. 626 // timeout). Client should try again later.
627 MIGRATION_DONE = 9; // Migration has finished for one or more data 627 MIGRATION_DONE = 9; // Migration has finished for one or more data
628 // types. Client should clear the cache for 628 // types. Client should clear the cache for
629 // these data types only and then re-sync with 629 // these data types only and then re-sync with
630 // a server. 630 // a server.
akalin 2011/11/21 20:04:26 add a comment about how migrated_data_type_id is u
lipalani1 2011/11/21 21:55:38 Done.
631 UNKNOWN = 100; // Unknown value. This should never be explicitly 631 UNKNOWN = 100; // Unknown value. This should never be explicitly
632 // used; it is the default value when an 632 // used; it is the default value when an
633 // out-of-date client parses a value it doesn't 633 // out-of-date client parses a value it doesn't
634 // recognize. 634 // recognize.
635 } 635 }
636 636
637 message Error { 637 message Error {
638 optional ErrorType error_type = 1 [default = UNKNOWN]; 638 optional ErrorType error_type = 1 [default = UNKNOWN];
639 optional string error_description = 2; 639 optional string error_description = 2;
640 optional string url = 3; 640 optional string url = 3;
641 enum Action { 641 enum Action {
642 UPGRADE_CLIENT = 0; // Upgrade the client to latest version. 642 UPGRADE_CLIENT = 0; // Upgrade the client to latest version.
643 CLEAR_USER_DATA_AND_RESYNC = 1; // Clear user data from dashboard and 643 CLEAR_USER_DATA_AND_RESYNC = 1; // Clear user data from dashboard and
644 // setup sync again. 644 // setup sync again.
645 ENABLE_SYNC_ON_ACCOUNT = 2; // The administrator needs to enable sync 645 ENABLE_SYNC_ON_ACCOUNT = 2; // The administrator needs to enable sync
646 // on the account. 646 // on the account.
647 STOP_AND_RESTART_SYNC = 3; // Stop sync and set up sync again. 647 STOP_AND_RESTART_SYNC = 3; // Stop sync and set up sync again.
648 DISABLE_SYNC_ON_CLIENT = 4; // Wipe the client of all sync data and 648 DISABLE_SYNC_ON_CLIENT = 4; // Wipe the client of all sync data and
649 // stop syncing. 649 // stop syncing.
650 UNKNOWN_ACTION = 5; // This is the default. 650 UNKNOWN_ACTION = 5; // This is the default.
651 } 651 }
652 optional Action action = 4 [default = UNKNOWN_ACTION]; 652 optional Action action = 4 [default = UNKNOWN_ACTION];
653
654 // Meaningful if the |error_type| is throttled. If this field is absent
655 // then the whole client(all datatypes) is throttled.
akalin 2011/11/21 20:04:26 space before (
lipalani1 2011/11/21 21:55:38 Not sure I understand? On 2011/11/21 20:04:26, aka
656 repeated int32 throttled_data_type_ids = 5;
akalin 2011/11/21 20:04:26 i think this should be named more generically, lik
lipalani1 2011/11/21 21:55:38 Renamed. Not sure I understand the rest of the com
653 } 657 }
654 658
655 optional Error error = 13; 659 optional Error error = 13;
656 660
657 // Up until protocol_version 24, the default was SUCCESS which made it 661 // Up until protocol_version 24, the default was SUCCESS which made it
658 // impossible to add new enum values since older clients would parse any 662 // impossible to add new enum values since older clients would parse any
659 // out-of-range value as SUCCESS. Starting with 25, unless explicitly set, 663 // out-of-range value as SUCCESS. Starting with 25, unless explicitly set,
660 // the error_code will be UNKNOWN so that clients know when they're 664 // the error_code will be UNKNOWN so that clients know when they're
661 // out-of-date. Note also that when using protocol_version < 25, 665 // out-of-date. Note also that when using protocol_version < 25,
662 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP 666 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP
663 // 400 error code. This is deprecated now. 667 // 400 error code. This is deprecated now.
664 optional ErrorType error_code = 4 [default = UNKNOWN]; 668 optional ErrorType error_code = 4 [default = UNKNOWN];
665 optional string error_message = 5; 669 optional string error_message = 5;
666 670
667 // Opaque store ID; if it changes, the contents of the client's cache 671 // Opaque store ID; if it changes, the contents of the client's cache
668 // is meaningless to this server. This happens most typically when 672 // is meaningless to this server. This happens most typically when
669 // you switch from one storage backend instance (say, a test instance) 673 // you switch from one storage backend instance (say, a test instance)
670 // to another (say, the official instance). 674 // to another (say, the official instance).
671 optional string store_birthday = 6; 675 optional string store_birthday = 6;
672 676
673 optional ClientCommand client_command = 7; 677 optional ClientCommand client_command = 7;
674 optional ProfilingData profiling_data = 8; 678 optional ProfilingData profiling_data = 8;
675 679
676 // The data types whose storage has been migrated. Present when the value of 680 // The data types whose storage has been migrated. Present when the value of
677 // error_code is MIGRATION_DONE. 681 // error_code is MIGRATION_DONE.
678 repeated int32 migrated_data_type_id = 12; 682 repeated int32 migrated_data_type_id = 12;
679 }; 683 };
680 684
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698