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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 optional NigoriSpecifics nigori = 47745; | 111 optional NigoriSpecifics nigori = 47745; |
112 optional ExtensionSpecifics extension = 48119; | 112 optional ExtensionSpecifics extension = 48119; |
113 optional AppSpecifics app = 48364; | 113 optional AppSpecifics app = 48364; |
114 optional SessionSpecifics session = 50119; | 114 optional SessionSpecifics session = 50119; |
115 optional AutofillProfileSpecifics autofill_profile = 63951; | 115 optional AutofillProfileSpecifics autofill_profile = 63951; |
116 optional SearchEngineSpecifics search_engine = 88610; | 116 optional SearchEngineSpecifics search_engine = 88610; |
117 optional ExtensionSettingSpecifics extension_setting = 96159; | 117 optional ExtensionSettingSpecifics extension_setting = 96159; |
118 optional AppSettingSpecifics app_setting = 103656; | 118 optional AppSettingSpecifics app_setting = 103656; |
119 optional HistoryDeleteDirectiveSpecifics history_delete_directive = 150251; | 119 optional HistoryDeleteDirectiveSpecifics history_delete_directive = 150251; |
120 optional SyncedNotificationSpecifics synced_notification = 153108; | 120 optional SyncedNotificationSpecifics synced_notification = 153108; |
121 optional SyncedNotificationAppInfoSpecifics synced_notification_app_info = 235
816; | 121 optional SyncedNotificationAppInfoSpecifics synced_notification_app_info = |
| 122 235816; |
122 optional DeviceInfoSpecifics device_info = 154522; | 123 optional DeviceInfoSpecifics device_info = 154522; |
123 optional ExperimentsSpecifics experiments = 161496; | 124 optional ExperimentsSpecifics experiments = 161496; |
124 optional PriorityPreferenceSpecifics priority_preference = 163425; | 125 optional PriorityPreferenceSpecifics priority_preference = 163425; |
125 optional DictionarySpecifics dictionary = 170540; | 126 optional DictionarySpecifics dictionary = 170540; |
126 optional FaviconTrackingSpecifics favicon_tracking = 181534; | 127 optional FaviconTrackingSpecifics favicon_tracking = 181534; |
127 optional FaviconImageSpecifics favicon_image = 182019; | 128 optional FaviconImageSpecifics favicon_image = 182019; |
128 optional ManagedUserSettingSpecifics managed_user_setting = 186662; | 129 optional ManagedUserSettingSpecifics managed_user_setting = 186662; |
129 optional ManagedUserSpecifics managed_user = 194582; | 130 optional ManagedUserSpecifics managed_user = 194582; |
130 optional ManagedUserSharedSettingSpecifics managed_user_shared_setting = | 131 optional ManagedUserSharedSettingSpecifics managed_user_shared_setting = |
131 202026; | 132 202026; |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 // How many times the extension successfully invoked a write | 392 // How many times the extension successfully invoked a write |
392 // operation through the bookmarks API since the last CommitMessage. | 393 // operation through the bookmarks API since the last CommitMessage. |
393 optional uint32 bookmark_writes_since_last_commit = 2; | 394 optional uint32 bookmark_writes_since_last_commit = 2; |
394 }; | 395 }; |
395 | 396 |
396 // Client specific configuration information. | 397 // Client specific configuration information. |
397 message ClientConfigParams { | 398 message ClientConfigParams { |
398 // The set of data types this client has enabled. Note that this does not | 399 // The set of data types this client has enabled. Note that this does not |
399 // include proxy types, as they do not have protocol field numbers and are | 400 // include proxy types, as they do not have protocol field numbers and are |
400 // placeholder types that implicitly enable protocol types. | 401 // placeholder types that implicitly enable protocol types. |
401 repeated int32 enabled_type_ids = 1; | 402 repeated int32 enabled_type_ids = 1; |
402 | 403 |
403 // Whether the PROXY_TABS proxy datatype is enabled on this client. | 404 // Whether the PROXY_TABS proxy datatype is enabled on this client. |
404 optional bool tabs_datatype_enabled = 2; | 405 optional bool tabs_datatype_enabled = 2; |
405 | 406 |
406 // Whether the account(s) present in the content area's cookie jar match the | 407 // Whether the account(s) present in the content area's cookie jar match the |
407 // chrome account. If multiple accounts are present in the cookie jar, a | 408 // chrome account. If multiple accounts are present in the cookie jar, a |
408 // mismatch implies all of them are different from the chrome account. | 409 // mismatch implies all of them are different from the chrome account. |
409 optional bool cookie_jar_mismatch = 3; | 410 optional bool cookie_jar_mismatch = 3; |
410 }; | 411 }; |
411 | 412 |
412 message CommitMessage { | 413 message CommitMessage { |
413 repeated SyncEntity entries = 1; | 414 repeated SyncEntity entries = 1; |
414 | 415 |
415 // A GUID that identifies the committing sync client. This value will be | 416 // A GUID that identifies the committing sync client. This value will be |
416 // returned as originator_cache_guid for any new items. | 417 // returned as originator_cache_guid for any new items. |
417 optional string cache_guid = 2; | 418 optional string cache_guid = 2; |
418 | 419 |
419 repeated ChromiumExtensionsActivity extensions_activity = 3; | 420 repeated ChromiumExtensionsActivity extensions_activity = 3; |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 // No arguments needed as the store birthday and user identifier are part of | 682 // No arguments needed as the store birthday and user identifier are part of |
682 // an enclosing message. | 683 // an enclosing message. |
683 }; | 684 }; |
684 | 685 |
685 // Response to a ClearServerData request. | 686 // Response to a ClearServerData request. |
686 message ClearServerDataResponse { | 687 message ClearServerDataResponse { |
687 // No result fields necessary. Success/failure is indicated in | 688 // No result fields necessary. Success/failure is indicated in |
688 // ClientToServerResponse. | 689 // ClientToServerResponse. |
689 }; | 690 }; |
690 | 691 |
691 message DeprecatedMessage1 { | 692 message DeprecatedMessage1 {}; |
692 }; | |
693 | 693 |
694 message DeprecatedMessage2 { | 694 message DeprecatedMessage2 {}; |
695 }; | |
696 | 695 |
697 // The client must preserve, store, and resend the chip bag with | 696 // The client must preserve, store, and resend the chip bag with |
698 // every request. The server depends on the chip bag in order | 697 // every request. The server depends on the chip bag in order |
699 // to precisely choreograph a client-server state machines. | 698 // to precisely choreograph a client-server state machines. |
700 // | 699 // |
701 // Because the client stores and sends this data on every request, | 700 // Because the client stores and sends this data on every request, |
702 // the contents of the chip bag should be kept relatively small. | 701 // the contents of the chip bag should be kept relatively small. |
703 // | 702 // |
704 // If the server does not return a chip bag, the client must assume | 703 // If the server does not return a chip bag, the client must assume |
705 // that there has been no change to the chip bag. The client must | 704 // that there has been no change to the chip bag. The client must |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 // message_contents. Each type has a corresponding message field that will be | 754 // message_contents. Each type has a corresponding message field that will be |
756 // present iff the message is of that type. E.g. a commit message will have a | 755 // present iff the message is of that type. E.g. a commit message will have a |
757 // message_contents of COMMIT and its commit field will be present. | 756 // message_contents of COMMIT and its commit field will be present. |
758 required Contents message_contents = 3; | 757 required Contents message_contents = 3; |
759 optional CommitMessage commit = 4; | 758 optional CommitMessage commit = 4; |
760 optional GetUpdatesMessage get_updates = 5; | 759 optional GetUpdatesMessage get_updates = 5; |
761 optional AuthenticateMessage authenticate = 6; | 760 optional AuthenticateMessage authenticate = 6; |
762 | 761 |
763 optional DeprecatedMessage1 deprecated_field_9 = 9 [deprecated = true]; | 762 optional DeprecatedMessage1 deprecated_field_9 = 9 [deprecated = true]; |
764 | 763 |
765 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! | 764 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! |
766 // The client sets this if it detects a sync issue. The server will tell it | 765 // The client sets this if it detects a sync issue. The server will tell it |
767 // if it should perform a refresh. | 766 // if it should perform a refresh. |
768 optional bool sync_problem_detected = 8 [default = false]; | 767 optional bool sync_problem_detected = 8 [default = false]; |
769 | 768 |
770 // Client side state information for debugging purpose. | 769 // Client side state information for debugging purpose. |
771 // This is only sent on the first getupdates of every sync cycle, | 770 // This is only sent on the first getupdates of every sync cycle, |
772 // as an optimization to save bandwidth. | 771 // as an optimization to save bandwidth. |
773 optional DebugInfo debug_info = 10; | 772 optional DebugInfo debug_info = 10; |
774 | 773 |
775 // Per-client state for use by the server. Sent with every message sent to the | 774 // Per-client state for use by the server. Sent with every message sent to the |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 optional string stack_id = 1; | 810 optional string stack_id = 1; |
812 | 811 |
813 // Time of the crash, potentially rounded to remove | 812 // Time of the crash, potentially rounded to remove |
814 // significant bits. | 813 // significant bits. |
815 optional int64 crash_time_millis = 2; | 814 optional int64 crash_time_millis = 2; |
816 } | 815 } |
817 | 816 |
818 message CommitResponse { | 817 message CommitResponse { |
819 enum ResponseType { | 818 enum ResponseType { |
820 SUCCESS = 1; | 819 SUCCESS = 1; |
821 CONFLICT = 2; // You're out of date; update and check your data | 820 CONFLICT = 2; // You're out of date; update and check your data |
822 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? | 821 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? |
823 RETRY = 3; // Someone has a conflicting, non-expired session open | 822 RETRY = 3; // Someone has a conflicting, non-expired session open |
824 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again | 823 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again |
825 // won't help. | 824 // won't help. |
826 OVER_QUOTA = 5; // This operation would put you, or you are, over quota | 825 OVER_QUOTA = 5; // This operation would put you, or you are, over quota |
827 TRANSIENT_ERROR = 6; // Something went wrong; try again in a bit | 826 TRANSIENT_ERROR = 6; // Something went wrong; try again in a bit |
828 } | 827 } |
829 repeated group EntryResponse = 1 { | 828 repeated group EntryResponse = 1 { |
830 required ResponseType response_type = 2; | 829 required ResponseType response_type = 2; |
831 | 830 |
832 // Sync servers may also return a new ID for an existing item, indicating | 831 // Sync servers may also return a new ID for an existing item, indicating |
833 // a new entry's been created to hold the data the client's sending up. | 832 // a new entry's been created to hold the data the client's sending up. |
834 optional string id_string = 3; | 833 optional string id_string = 3; |
835 | 834 |
836 // should be filled if our parent was assigned a new ID. | 835 // should be filled if our parent was assigned a new ID. |
837 optional string parent_id_string = 4; | 836 optional string parent_id_string = 4; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 message GetUpdatesStreamingResponse { | 936 message GetUpdatesStreamingResponse { |
938 // New sync entries that the client should apply. | 937 // New sync entries that the client should apply. |
939 repeated SyncEntity entries = 1; | 938 repeated SyncEntity entries = 1; |
940 }; | 939 }; |
941 | 940 |
942 // A user-identifying struct. For a given Google account the email and display | 941 // A user-identifying struct. For a given Google account the email and display |
943 // name can change, but obfuscated_id should be constant. | 942 // name can change, but obfuscated_id should be constant. |
944 // The obfuscated id is optional because at least one planned use of the proto | 943 // The obfuscated id is optional because at least one planned use of the proto |
945 // (sharing) does not require it. | 944 // (sharing) does not require it. |
946 message UserIdentification { | 945 message UserIdentification { |
947 required string email = 1; // the user's full primary email address. | 946 required string email = 1; // the user's full primary email address. |
948 optional string display_name = 2; // the user's display name. | 947 optional string display_name = 2; // the user's display name. |
949 optional string obfuscated_id = 3; // an obfuscated, opaque user id. | 948 optional string obfuscated_id = 3; // an obfuscated, opaque user id. |
950 }; | 949 }; |
951 | 950 |
952 message AuthenticateResponse { | 951 message AuthenticateResponse { |
953 // Optional only for backward compatibility. | 952 // Optional only for backward compatibility. |
954 optional UserIdentification user = 1; | 953 optional UserIdentification user = 1; |
955 }; | 954 }; |
956 | 955 |
957 message ThrottleParameters { | 956 message ThrottleParameters { |
958 // Deprecated. Remove this from the server side. | 957 // Deprecated. Remove this from the server side. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, | 990 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, |
992 // none of the other fields (error_code and etc) will be set. | 991 // none of the other fields (error_code and etc) will be set. |
993 optional GetUpdatesStreamingResponse stream_data = 11; | 992 optional GetUpdatesStreamingResponse stream_data = 11; |
994 | 993 |
995 // The data types whose storage has been migrated. Present when the value of | 994 // The data types whose storage has been migrated. Present when the value of |
996 // error_code is MIGRATION_DONE. | 995 // error_code is MIGRATION_DONE. |
997 repeated int32 migrated_data_type_id = 12; | 996 repeated int32 migrated_data_type_id = 12; |
998 | 997 |
999 message Error { | 998 message Error { |
1000 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; | 999 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; |
1001 optional string error_description = 2; | 1000 optional string error_description = 2; |
1002 optional string url = 3; | 1001 optional string url = 3; |
1003 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; | 1002 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; |
1004 | 1003 |
1005 // Currently meaningful if |error_type| is throttled or partial_failure. | 1004 // Currently meaningful if |error_type| is throttled or partial_failure. |
1006 // In the throttled case, if this field is absent then the whole client | 1005 // In the throttled case, if this field is absent then the whole client |
1007 // (all datatypes) is throttled. | 1006 // (all datatypes) is throttled. |
1008 // In the partial_failure case, this field denotes partial failures. The | 1007 // In the partial_failure case, this field denotes partial failures. The |
1009 // client should retry those datatypes with exponential backoff. | 1008 // client should retry those datatypes with exponential backoff. |
1010 repeated int32 error_data_type_ids = 5; | 1009 repeated int32 error_data_type_ids = 5; |
1011 } | 1010 } |
1012 optional Error error = 13; | 1011 optional Error error = 13; |
1013 | 1012 |
1014 // The new per-client state for this client. If set, should be persisted and | 1013 // The new per-client state for this client. If set, should be persisted and |
1015 // sent with any subsequent ClientToServerMessages. | 1014 // sent with any subsequent ClientToServerMessages. |
1016 optional ChipBag new_bag_of_chips = 14; | 1015 optional ChipBag new_bag_of_chips = 14; |
1017 | 1016 |
1018 // Present if this ClientToServerResponse is in response to a ClearServerData | 1017 // Present if this ClientToServerResponse is in response to a ClearServerData |
1019 // request. | 1018 // request. |
1020 optional ClearServerDataResponse clear_server_data = 15; | 1019 optional ClearServerDataResponse clear_server_data = 15; |
1021 }; | 1020 }; |
1022 | 1021 |
1023 // A message to notify the server of certain sync events. Idempotent. Send these | 1022 // A message to notify the server of certain sync events. Idempotent. Send these |
1024 // to the /event endpoint. | 1023 // to the /event endpoint. |
1025 message EventRequest { | 1024 message EventRequest { |
1026 optional SyncDisabledEvent sync_disabled = 1; | 1025 optional SyncDisabledEvent sync_disabled = 1; |
1027 }; | 1026 }; |
1028 | 1027 |
1029 message EventResponse { | 1028 message EventResponse {}; |
1030 }; | |
1031 | 1029 |
1032 // A message indicating that the sync engine has been disabled on a client. | 1030 // A message indicating that the sync engine has been disabled on a client. |
1033 message SyncDisabledEvent { | 1031 message SyncDisabledEvent { |
1034 // The GUID that identifies the sync client. | 1032 // The GUID that identifies the sync client. |
1035 optional string cache_guid = 1; | 1033 optional string cache_guid = 1; |
1036 | 1034 |
1037 // The store birthday that the client was using before disabling sync. | 1035 // The store birthday that the client was using before disabling sync. |
1038 optional string store_birthday = 2; | 1036 optional string store_birthday = 2; |
1039 }; | 1037 }; |
OLD | NEW |