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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 // This value is an udpated version of the GetUpdatesCallerInfo's | 583 // This value is an udpated version of the GetUpdatesCallerInfo's |
584 // GetUpdatesSource. It describes the reason for the GetUpdate request. | 584 // GetUpdatesSource. It describes the reason for the GetUpdate request. |
585 // Introduced in M29. | 585 // Introduced in M29. |
586 optional SyncEnums.GetUpdatesOrigin get_updates_origin = 9; | 586 optional SyncEnums.GetUpdatesOrigin get_updates_origin = 9; |
587 }; | 587 }; |
588 | 588 |
589 message AuthenticateMessage { | 589 message AuthenticateMessage { |
590 required string auth_token = 1; | 590 required string auth_token = 1; |
591 }; | 591 }; |
592 | 592 |
| 593 message ClearUserDataMessage { |
| 594 }; |
| 595 |
| 596 message ClearUserDataResponse { |
| 597 }; |
| 598 |
593 // The client must preserve, store, and resend the chip bag with | 599 // The client must preserve, store, and resend the chip bag with |
594 // every request. The server depends on the chip bag in order | 600 // every request. The server depends on the chip bag in order |
595 // to precisely choreograph a client-server state machines. | 601 // to precisely choreograph a client-server state machines. |
596 // | 602 // |
597 // Because the client stores and sends this data on every request, | 603 // Because the client stores and sends this data on every request, |
598 // the contents of the chip bag should be kept relatively small. | 604 // the contents of the chip bag should be kept relatively small. |
599 // | 605 // |
600 // If the server does not return a chip bag, the client must assume | 606 // If the server does not return a chip bag, the client must assume |
601 // that there has been no change to the chip bag. The client must | 607 // that there has been no change to the chip bag. The client must |
602 // resend the bag of chips it had prior on the next request. | 608 // resend the bag of chips it had prior on the next request. |
(...skipping 27 matching lines...) Expand all Loading... |
630 AUTHENTICATE = 3; | 636 AUTHENTICATE = 3; |
631 CLEAR_DATA = 4; | 637 CLEAR_DATA = 4; |
632 } | 638 } |
633 | 639 |
634 required Contents message_contents = 3; | 640 required Contents message_contents = 3; |
635 optional CommitMessage commit = 4; | 641 optional CommitMessage commit = 4; |
636 optional GetUpdatesMessage get_updates = 5; | 642 optional GetUpdatesMessage get_updates = 5; |
637 optional AuthenticateMessage authenticate = 6; | 643 optional AuthenticateMessage authenticate = 6; |
638 | 644 |
639 // Request to clear all Chromium data from the server. | 645 // Request to clear all Chromium data from the server. |
640 // DEPRECATED - this field was never used in production. | 646 optional ClearUserDataMessage clear_user_data = 9; |
641 // optional ClearUserDataMessage clear_user_data = 9; | |
642 | 647 |
643 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! | 648 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! |
644 // The client sets this if it detects a sync issue. The server will tell it | 649 // The client sets this if it detects a sync issue. The server will tell it |
645 // if it should perform a refresh. | 650 // if it should perform a refresh. |
646 optional bool sync_problem_detected = 8 [default = false]; | 651 optional bool sync_problem_detected = 8 [default = false]; |
647 | 652 |
648 // Client side state information for debugging purpose. | 653 // Client side state information for debugging purpose. |
649 // This is only sent on the first getupdates of every sync cycle, | 654 // This is only sent on the first getupdates of every sync cycle, |
650 // as an optimization to save bandwidth. | 655 // as an optimization to save bandwidth. |
651 optional DebugInfo debug_info = 10; | 656 optional DebugInfo debug_info = 10; |
652 | 657 |
653 // Per-client state for use by the server. Sent with every message sent to the | 658 // Per-client state for use by the server. Sent with every message sent to the |
654 // server. | 659 // server. |
655 optional ChipBag bag_of_chips = 11; | 660 optional ChipBag bag_of_chips = 11; |
656 | 661 |
657 // Google API key. | 662 // Google API key. |
658 optional string api_key = 12; | 663 optional string api_key = 12; |
659 | 664 |
660 // Client's self-reported state. | 665 // Client's self-reported state. |
661 // The client should set this on every message sent to the server, though its | 666 // The client should set this on every message sent to the server, though its |
662 // member fields may often be unset. | 667 // member fields may often be unset. |
663 optional ClientStatus client_status = 13; | 668 optional ClientStatus client_status = 13; |
664 | 669 |
665 // The ID that our invalidation client used to identify itself to the server. | 670 // The ID that our invalidation client used to identify itself to the server. |
666 // Sending the ID here allows the server to not send notifications of our own | 671 // Sending the ID here allows the server to not send notifications of our own |
667 // changes to our invalidator. | 672 // changes to our invalidator. |
668 optional string invalidator_client_id = 14; | 673 optional string invalidator_client_id = 14; |
669 }; | 674 }; |
670 | 675 |
| 676 // This request allows the client to convert a specific crash identifier |
| 677 // into more general information (e.g. hash of the crashing call stack) |
| 678 // suitable for upload in an (authenticated) DebugInfo event. |
| 679 message GetCrashInfoRequest { |
| 680 // Id of the uploaded crash. |
| 681 optional string crash_id = 1; |
| 682 |
| 683 // Time that the crash occurred. |
| 684 optional int64 crash_time_millis = 2; |
| 685 } |
| 686 |
| 687 // Proto to be written in its entirety to the debug info log. |
| 688 message GetCrashInfoResponse { |
| 689 // Hash of the crashing call stack. |
| 690 optional string stack_id = 1; |
| 691 |
| 692 // Time of the crash, potentially rounded to remove |
| 693 // significant bits. |
| 694 optional int64 crash_time_millis = 2; |
| 695 } |
| 696 |
671 message CommitResponse { | 697 message CommitResponse { |
672 enum ResponseType { | 698 enum ResponseType { |
673 SUCCESS = 1; | 699 SUCCESS = 1; |
674 CONFLICT = 2; // You're out of date; update and check your data | 700 CONFLICT = 2; // You're out of date; update and check your data |
675 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? | 701 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? |
676 RETRY = 3; // Someone has a conflicting, non-expired session open | 702 RETRY = 3; // Someone has a conflicting, non-expired session open |
677 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again | 703 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again |
678 // won't help. | 704 // won't help. |
679 OVER_QUOTA = 5; // This operation would put you, or you are, over quota | 705 OVER_QUOTA = 5; // This operation would put you, or you are, over quota |
680 TRANSIENT_ERROR = 6; // Something went wrong; try again in a bit | 706 TRANSIENT_ERROR = 6; // Something went wrong; try again in a bit |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 optional string error_message = 5; | 855 optional string error_message = 5; |
830 | 856 |
831 // Opaque store ID; if it changes, the contents of the client's cache | 857 // Opaque store ID; if it changes, the contents of the client's cache |
832 // is meaningless to this server. This happens most typically when | 858 // is meaningless to this server. This happens most typically when |
833 // you switch from one storage backend instance (say, a test instance) | 859 // you switch from one storage backend instance (say, a test instance) |
834 // to another (say, the official instance). | 860 // to another (say, the official instance). |
835 optional string store_birthday = 6; | 861 optional string store_birthday = 6; |
836 | 862 |
837 optional ClientCommand client_command = 7; | 863 optional ClientCommand client_command = 7; |
838 optional ProfilingData profiling_data = 8; | 864 optional ProfilingData profiling_data = 8; |
839 // DEPRECATED - this field was never used in production. | 865 optional ClearUserDataResponse clear_user_data = 9; |
840 // optional ClearUserDataResponse clear_user_data = 9; | |
841 optional GetUpdatesMetadataResponse stream_metadata = 10; | 866 optional GetUpdatesMetadataResponse stream_metadata = 10; |
842 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, | 867 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, |
843 // none of the other fields (error_code and etc) will be set. | 868 // none of the other fields (error_code and etc) will be set. |
844 optional GetUpdatesStreamingResponse stream_data = 11; | 869 optional GetUpdatesStreamingResponse stream_data = 11; |
845 | 870 |
846 // The data types whose storage has been migrated. Present when the value of | 871 // The data types whose storage has been migrated. Present when the value of |
847 // error_code is MIGRATION_DONE. | 872 // error_code is MIGRATION_DONE. |
848 repeated int32 migrated_data_type_id = 12; | 873 repeated int32 migrated_data_type_id = 12; |
849 | 874 |
850 message Error { | 875 message Error { |
851 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; | 876 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; |
852 optional string error_description = 2; | 877 optional string error_description = 2; |
853 optional string url = 3; | 878 optional string url = 3; |
854 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; | 879 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; |
855 | 880 |
856 // Currently only meaningful if |error_type| is throttled. If this field | 881 // Currently only meaningful if |error_type| is throttled. If this field |
857 // is absent then the whole client (all datatypes) is throttled. | 882 // is absent then the whole client (all datatypes) is throttled. |
858 repeated int32 error_data_type_ids = 5; | 883 repeated int32 error_data_type_ids = 5; |
859 } | 884 } |
860 optional Error error = 13; | 885 optional Error error = 13; |
861 | 886 |
862 // The new per-client state for this client. If set, should be persisted and | 887 // The new per-client state for this client. If set, should be persisted and |
863 // sent with any subsequent ClientToServerMessages. | 888 // sent with any subsequent ClientToServerMessages. |
864 optional ChipBag new_bag_of_chips = 14; | 889 optional ChipBag new_bag_of_chips = 14; |
865 }; | 890 }; |
866 | 891 |
OLD | NEW |