| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 448 |
| 449 // Whether to create the mobile bookmarks folder if it's not | 449 // Whether to create the mobile bookmarks folder if it's not |
| 450 // already created. Should be set to true only by mobile clients. | 450 // already created. Should be set to true only by mobile clients. |
| 451 optional bool create_mobile_bookmarks_folder = 1000 [default = false]; | 451 optional bool create_mobile_bookmarks_folder = 1000 [default = false]; |
| 452 }; | 452 }; |
| 453 | 453 |
| 454 message AuthenticateMessage { | 454 message AuthenticateMessage { |
| 455 required string auth_token = 1; | 455 required string auth_token = 1; |
| 456 }; | 456 }; |
| 457 | 457 |
| 458 // This message is sent to the server to clear data. An asynchronous | |
| 459 // response is returned to the client indicating that the server has received | |
| 460 // the request and has begun to clear data. | |
| 461 message ClearUserDataMessage { | |
| 462 } | |
| 463 | |
| 464 message ClearUserDataResponse { | |
| 465 } | |
| 466 | |
| 467 message ClientToServerMessage { | 458 message ClientToServerMessage { |
| 468 required string share = 1; | 459 required string share = 1; |
| 469 optional int32 protocol_version = 2 [default = 31]; | 460 optional int32 protocol_version = 2 [default = 31]; |
| 470 enum Contents { | 461 enum Contents { |
| 471 COMMIT = 1; | 462 COMMIT = 1; |
| 472 GET_UPDATES = 2; | 463 GET_UPDATES = 2; |
| 473 AUTHENTICATE = 3; | 464 AUTHENTICATE = 3; |
| 474 CLEAR_DATA = 4; | 465 CLEAR_DATA = 4; |
| 475 } | 466 } |
| 476 | 467 |
| 477 required Contents message_contents = 3; | 468 required Contents message_contents = 3; |
| 478 optional CommitMessage commit = 4; | 469 optional CommitMessage commit = 4; |
| 479 optional GetUpdatesMessage get_updates = 5; | 470 optional GetUpdatesMessage get_updates = 5; |
| 480 optional AuthenticateMessage authenticate = 6; | 471 optional AuthenticateMessage authenticate = 6; |
| 481 // Request to clear all Chromium data from the server | 472 |
| 482 optional ClearUserDataMessage clear_user_data = 9; | 473 // Request to clear all Chromium data from the server. |
| 474 // DEPRECATED - this field was never used in production. |
| 475 // optional ClearUserDataMessage clear_user_data = 9; |
| 483 | 476 |
| 484 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! | 477 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! |
| 485 // The client sets this if it detects a sync issue. The server will tell it | 478 // The client sets this if it detects a sync issue. The server will tell it |
| 486 // if it should perform a refresh. | 479 // if it should perform a refresh. |
| 487 optional bool sync_problem_detected = 8 [default = false]; | 480 optional bool sync_problem_detected = 8 [default = false]; |
| 488 | 481 |
| 489 // Client side state information for debugging purpose. | 482 // Client side state information for debugging purpose. |
| 490 // This is only sent on the first getupdates of every sync cycle, | 483 // This is only sent on the first getupdates of every sync cycle, |
| 491 // as an optimization to save bandwidth. | 484 // as an optimization to save bandwidth. |
| 492 optional DebugInfo debug_info = 10; | 485 optional DebugInfo debug_info = 10; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 required double target_utilization = 2; | 618 required double target_utilization = 2; |
| 626 required double measure_interval_max = 3; | 619 required double measure_interval_max = 3; |
| 627 required double measure_interval_min = 4; | 620 required double measure_interval_min = 4; |
| 628 required double observation_window = 5; | 621 required double observation_window = 5; |
| 629 }; | 622 }; |
| 630 | 623 |
| 631 message ClientToServerResponse { | 624 message ClientToServerResponse { |
| 632 optional CommitResponse commit = 1; | 625 optional CommitResponse commit = 1; |
| 633 optional GetUpdatesResponse get_updates = 2; | 626 optional GetUpdatesResponse get_updates = 2; |
| 634 optional AuthenticateResponse authenticate = 3; | 627 optional AuthenticateResponse authenticate = 3; |
| 635 optional ClearUserDataResponse clear_user_data = 9; | 628 // DEPRECATED - this field was never used in production. |
| 629 // optional ClearUserDataResponse clear_user_data = 9; |
| 636 optional GetUpdatesMetadataResponse stream_metadata = 10; | 630 optional GetUpdatesMetadataResponse stream_metadata = 10; |
| 637 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, | 631 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse, |
| 638 // none of the other fields (error_code and etc) will be set. | 632 // none of the other fields (error_code and etc) will be set. |
| 639 optional GetUpdatesStreamingResponse stream_data = 11; | 633 optional GetUpdatesStreamingResponse stream_data = 11; |
| 640 | 634 |
| 641 message Error { | 635 message Error { |
| 642 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; | 636 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN]; |
| 643 optional string error_description = 2; | 637 optional string error_description = 2; |
| 644 optional string url = 3; | 638 optional string url = 3; |
| 645 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; | 639 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION]; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 668 optional string store_birthday = 6; | 662 optional string store_birthday = 6; |
| 669 | 663 |
| 670 optional ClientCommand client_command = 7; | 664 optional ClientCommand client_command = 7; |
| 671 optional ProfilingData profiling_data = 8; | 665 optional ProfilingData profiling_data = 8; |
| 672 | 666 |
| 673 // The data types whose storage has been migrated. Present when the value of | 667 // The data types whose storage has been migrated. Present when the value of |
| 674 // error_code is MIGRATION_DONE. | 668 // error_code is MIGRATION_DONE. |
| 675 repeated int32 migrated_data_type_id = 12; | 669 repeated int32 migrated_data_type_id = 12; |
| 676 }; | 670 }; |
| 677 | 671 |
| OLD | NEW |