Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 401 optional string cache_guid = 2; | 401 optional string cache_guid = 2; |
| 402 | 402 |
| 403 repeated ChromiumExtensionsActivity extensions_activity = 3; | 403 repeated ChromiumExtensionsActivity extensions_activity = 3; |
| 404 | 404 |
| 405 // The configuration of this client at commit time. Used by the server to | 405 // The configuration of this client at commit time. Used by the server to |
| 406 // make commit-time decisions about how to process datatypes that might | 406 // make commit-time decisions about how to process datatypes that might |
| 407 // involve server-side interaction, and e.g require explicit user intent for | 407 // involve server-side interaction, and e.g require explicit user intent for |
| 408 // syncing a particular data type regardless of whether a commit for that | 408 // syncing a particular data type regardless of whether a commit for that |
| 409 // datatype is currently being sent up. | 409 // datatype is currently being sent up. |
| 410 optional ClientConfigParams config_params = 4; | 410 optional ClientConfigParams config_params = 4; |
| 411 | |
| 412 // Set of optional per-client datatype contexts. | |
| 413 repeated DataTypeContext client_contexts = 5; | |
| 411 }; | 414 }; |
| 412 | 415 |
| 413 // This message communicates additional per-type information related to | 416 // This message communicates additional per-type information related to |
| 414 // requests with origin GU_TRIGGER. This message is not relevant when any | 417 // requests with origin GU_TRIGGER. This message is not relevant when any |
| 415 // other origin value is used. | 418 // other origin value is used. |
| 416 // Introduced in M29. | 419 // Introduced in M29. |
| 417 message GetUpdateTriggers { | 420 message GetUpdateTriggers { |
| 418 // An opaque-to-the-client string of bytes, received through a notification, | 421 // An opaque-to-the-client string of bytes, received through a notification, |
| 419 // that the server may interpret as a hint about the location of the latest | 422 // that the server may interpret as a hint about the location of the latest |
| 420 // version of the data for this type. | 423 // version of the data for this type. |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 619 optional bool create_mobile_bookmarks_folder = 1000 [default = false]; | 622 optional bool create_mobile_bookmarks_folder = 1000 [default = false]; |
| 620 | 623 |
| 621 // This value is an updated version of the GetUpdatesCallerInfo's | 624 // This value is an updated version of the GetUpdatesCallerInfo's |
| 622 // GetUpdatesSource. It describes the reason for the GetUpdate request. | 625 // GetUpdatesSource. It describes the reason for the GetUpdate request. |
| 623 // Introduced in M29. | 626 // Introduced in M29. |
| 624 optional SyncEnums.GetUpdatesOrigin get_updates_origin = 9; | 627 optional SyncEnums.GetUpdatesOrigin get_updates_origin = 9; |
| 625 | 628 |
| 626 // Whether this GU also serves as a retry GU. Any GU that happens after | 629 // Whether this GU also serves as a retry GU. Any GU that happens after |
| 627 // retry timer timeout is a retry GU effectively. | 630 // retry timer timeout is a retry GU effectively. |
| 628 optional bool is_retry = 10 [default = false]; | 631 optional bool is_retry = 10 [default = false]; |
| 632 | |
| 633 // Set of optional per-client datatype contexts. | |
|
maniscalco
2014/04/03 16:59:37
Just for my own benefit... I assume that you're us
Nicolas Zea
2014/04/03 21:01:11
No, there should only be one per type.
| |
| 634 repeated DataTypeContext client_contexts = 11; | |
|
maniscalco
2014/04/03 16:59:37
I don't think we've been consistent, but going for
Nicolas Zea
2014/04/03 21:01:11
I don't think we have one. I try to use plural tho
| |
| 629 }; | 635 }; |
| 630 | 636 |
| 631 message AuthenticateMessage { | 637 message AuthenticateMessage { |
| 632 required string auth_token = 1; | 638 required string auth_token = 1; |
| 633 }; | 639 }; |
| 634 | 640 |
| 635 message ClearUserDataMessage { | 641 message ClearUserDataMessage { |
| 636 }; | 642 }; |
| 637 | 643 |
| 638 message ClearUserDataResponse { | 644 message ClearUserDataResponse { |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 662 // Flag to indicate if the client has detected hierarchy conflcits. The flag | 668 // Flag to indicate if the client has detected hierarchy conflcits. The flag |
| 663 // is left unset if update application has not been attempted yet. | 669 // is left unset if update application has not been attempted yet. |
| 664 // | 670 // |
| 665 // The server should attempt to resolve any hierarchy conflicts when this flag | 671 // The server should attempt to resolve any hierarchy conflicts when this flag |
| 666 // is set. The client may not assume that any particular action will be | 672 // is set. The client may not assume that any particular action will be |
| 667 // taken. There is no guarantee the problem will be addressed in a reasonable | 673 // taken. There is no guarantee the problem will be addressed in a reasonable |
| 668 // amount of time. | 674 // amount of time. |
| 669 optional bool hierarchy_conflict_detected = 1; | 675 optional bool hierarchy_conflict_detected = 1; |
| 670 } | 676 } |
| 671 | 677 |
| 678 // A single datatype's sync context. Allows the datatype to pass along | |
| 679 // datatype specific information with its own server backend. | |
| 680 message DataTypeContext { | |
| 681 // The type this context is associated with. | |
| 682 optional int32 type = 1; | |
|
maniscalco
2014/04/03 16:59:37
Elsewhere in this file I see "data_type_id". Is t
Nicolas Zea
2014/04/03 21:01:11
Done.
| |
| 683 // The context for the datatype. | |
| 684 optional bytes context = 2; | |
| 685 // The version of the context. | |
| 686 optional int64 version = 3; | |
| 687 } | |
| 688 | |
| 672 message ClientToServerMessage { | 689 message ClientToServerMessage { |
| 673 required string share = 1; | 690 required string share = 1; |
| 674 optional int32 protocol_version = 2 [default = 31]; | 691 optional int32 protocol_version = 2 [default = 31]; |
| 675 enum Contents { | 692 enum Contents { |
| 676 COMMIT = 1; | 693 COMMIT = 1; |
| 677 GET_UPDATES = 2; | 694 GET_UPDATES = 2; |
| 678 AUTHENTICATE = 3; | 695 AUTHENTICATE = 3; |
| 679 CLEAR_DATA = 4; | 696 CLEAR_DATA = 4; |
| 680 } | 697 } |
| 681 | 698 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 825 // | 842 // |
| 826 // Progress markers in the context of a response will never have the | 843 // Progress markers in the context of a response will never have the |
| 827 // |timestamp_token_for_migration| field set. | 844 // |timestamp_token_for_migration| field set. |
| 828 repeated DataTypeProgressMarker new_progress_marker = 5; | 845 repeated DataTypeProgressMarker new_progress_marker = 5; |
| 829 | 846 |
| 830 // The current encryption keys associated with this account. Will be set if | 847 // The current encryption keys associated with this account. Will be set if |
| 831 // the GetUpdatesMessage in the request had need_encryption_key == true or | 848 // the GetUpdatesMessage in the request had need_encryption_key == true or |
| 832 // the server has updated the set of encryption keys (e.g. due to a key | 849 // the server has updated the set of encryption keys (e.g. due to a key |
| 833 // rotation). | 850 // rotation). |
| 834 repeated bytes encryption_keys = 6; | 851 repeated bytes encryption_keys = 6; |
| 852 | |
| 853 // Set of optional datatype contexts server mutations. | |
| 854 repeated DataTypeContext context_mutations = 7; | |
| 835 }; | 855 }; |
| 836 | 856 |
| 837 // The metadata response for GetUpdatesMessage. This response is sent when | 857 // The metadata response for GetUpdatesMessage. This response is sent when |
| 838 // streaming is set to true in the request. It is prefixed with a length | 858 // streaming is set to true in the request. It is prefixed with a length |
| 839 // delimiter, which is encoded in varint. | 859 // delimiter, which is encoded in varint. |
| 840 message GetUpdatesMetadataResponse { | 860 message GetUpdatesMetadataResponse { |
| 841 // Approximate count of changes remaining. Detailed comment is available in | 861 // Approximate count of changes remaining. Detailed comment is available in |
| 842 // GetUpdatesResponse. | 862 // GetUpdatesResponse. |
| 843 optional int64 changes_remaining = 1; | 863 optional int64 changes_remaining = 1; |
| 844 | 864 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 924 // is absent then the whole client (all datatypes) is throttled. | 944 // is absent then the whole client (all datatypes) is throttled. |
| 925 repeated int32 error_data_type_ids = 5; | 945 repeated int32 error_data_type_ids = 5; |
| 926 } | 946 } |
| 927 optional Error error = 13; | 947 optional Error error = 13; |
| 928 | 948 |
| 929 // The new per-client state for this client. If set, should be persisted and | 949 // The new per-client state for this client. If set, should be persisted and |
| 930 // sent with any subsequent ClientToServerMessages. | 950 // sent with any subsequent ClientToServerMessages. |
| 931 optional ChipBag new_bag_of_chips = 14; | 951 optional ChipBag new_bag_of_chips = 14; |
| 932 }; | 952 }; |
| 933 | 953 |
| OLD | NEW |