OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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"; |
11 | 11 |
12 option optimize_for = LITE_RUNTIME; | 12 option optimize_for = LITE_RUNTIME; |
13 option retain_unknown_fields = true; | 13 option retain_unknown_fields = true; |
14 | 14 |
15 package sync_pb; | 15 package sync_pb; |
16 | 16 |
17 import "encryption.proto"; | 17 import "encryption.proto"; |
| 18 import "client_debug_info.proto"; |
18 | 19 |
19 // Used for inspecting how long we spent performing operations in different | 20 // Used for inspecting how long we spent performing operations in different |
20 // backends. All times must be in millis. | 21 // backends. All times must be in millis. |
21 message ProfilingData { | 22 message ProfilingData { |
22 optional int64 meta_data_write_time = 1; | 23 optional int64 meta_data_write_time = 1; |
23 optional int64 file_data_write_time = 2; | 24 optional int64 file_data_write_time = 2; |
24 optional int64 user_lookup_time = 3; | 25 optional int64 user_lookup_time = 3; |
25 optional int64 meta_data_read_time = 4; | 26 optional int64 meta_data_read_time = 4; |
26 optional int64 file_data_read_time = 5; | 27 optional int64 file_data_read_time = 5; |
27 optional int64 total_request_time = 6; | 28 optional int64 total_request_time = 6; |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 optional CommitMessage commit = 4; | 432 optional CommitMessage commit = 4; |
432 optional GetUpdatesMessage get_updates = 5; | 433 optional GetUpdatesMessage get_updates = 5; |
433 optional AuthenticateMessage authenticate = 6; | 434 optional AuthenticateMessage authenticate = 6; |
434 // Request to clear all Chromium data from the server | 435 // Request to clear all Chromium data from the server |
435 optional ClearUserDataMessage clear_user_data = 9; | 436 optional ClearUserDataMessage clear_user_data = 9; |
436 | 437 |
437 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! | 438 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! |
438 // The client sets this if it detects a sync issue. The server will tell it | 439 // The client sets this if it detects a sync issue. The server will tell it |
439 // if it should perform a refresh. | 440 // if it should perform a refresh. |
440 optional bool sync_problem_detected = 8 [default = false]; | 441 optional bool sync_problem_detected = 8 [default = false]; |
| 442 |
| 443 // Client side state information for debugging purpose. |
| 444 // This is only sent on the first getupdates of every sync cycle, |
| 445 // as an optimization to save bandwidth. |
| 446 optional DebugInfo debug_info = 10; |
441 }; | 447 }; |
442 | 448 |
443 message CommitResponse { | 449 message CommitResponse { |
444 enum ResponseType { | 450 enum ResponseType { |
445 SUCCESS = 1; | 451 SUCCESS = 1; |
446 CONFLICT = 2; // You're out of date; update and check your data | 452 CONFLICT = 2; // You're out of date; update and check your data |
447 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? | 453 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? |
448 RETRY = 3; // Someone has a conflicting, non-expired session open | 454 RETRY = 3; // Someone has a conflicting, non-expired session open |
449 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again | 455 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again |
450 // won't help. | 456 // won't help. |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 optional string store_birthday = 6; | 671 optional string store_birthday = 6; |
666 | 672 |
667 optional ClientCommand client_command = 7; | 673 optional ClientCommand client_command = 7; |
668 optional ProfilingData profiling_data = 8; | 674 optional ProfilingData profiling_data = 8; |
669 | 675 |
670 // The data types whose storage has been migrated. Present when the value of | 676 // The data types whose storage has been migrated. Present when the value of |
671 // error_code is MIGRATION_DONE. | 677 // error_code is MIGRATION_DONE. |
672 repeated int32 migrated_data_type_id = 12; | 678 repeated int32 migrated_data_type_id = 12; |
673 }; | 679 }; |
674 | 680 |
OLD | NEW |