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