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