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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // server. | 558 // server. |
559 optional ChipBag bag_of_chips = 11; | 559 optional ChipBag bag_of_chips = 11; |
560 | 560 |
561 // Google API key. | 561 // Google API key. |
562 optional string api_key = 12; | 562 optional string api_key = 12; |
563 | 563 |
564 // Client's self-reported state. | 564 // Client's self-reported state. |
565 // The client should set this on every message sent to the server, though its | 565 // The client should set this on every message sent to the server, though its |
566 // member fields may often be unset. | 566 // member fields may often be unset. |
567 optional ClientStatus client_status = 13; | 567 optional ClientStatus client_status = 13; |
| 568 |
| 569 // The ID that our invalidation client used to identify itself to the server. |
| 570 // Sending the ID here allows the server to not send notifications of our own |
| 571 // changes to our invalidator. |
| 572 optional string invalidator_client_id = 14; |
568 }; | 573 }; |
569 | 574 |
570 message CommitResponse { | 575 message CommitResponse { |
571 enum ResponseType { | 576 enum ResponseType { |
572 SUCCESS = 1; | 577 SUCCESS = 1; |
573 CONFLICT = 2; // You're out of date; update and check your data | 578 CONFLICT = 2; // You're out of date; update and check your data |
574 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? | 579 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? |
575 RETRY = 3; // Someone has a conflicting, non-expired session open | 580 RETRY = 3; // Someone has a conflicting, non-expired session open |
576 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again | 581 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again |
577 // won't help. | 582 // won't help. |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 // is absent then the whole client (all datatypes) is throttled. | 761 // is absent then the whole client (all datatypes) is throttled. |
757 repeated int32 error_data_type_ids = 5; | 762 repeated int32 error_data_type_ids = 5; |
758 } | 763 } |
759 optional Error error = 13; | 764 optional Error error = 13; |
760 | 765 |
761 // The new per-client state for this client. If set, should be persisted and | 766 // The new per-client state for this client. If set, should be persisted and |
762 // sent with any subsequent ClientToServerMessages. | 767 // sent with any subsequent ClientToServerMessages. |
763 optional ChipBag new_bag_of_chips = 14; | 768 optional ChipBag new_bag_of_chips = 14; |
764 }; | 769 }; |
765 | 770 |
OLD | NEW |