Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: sync/protocol/sync.proto

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 repeated DataTypeProgressMarker from_progress_marker = 6; 439 repeated DataTypeProgressMarker from_progress_marker = 6;
440 440
441 // Indicates whether the response should be sent in chunks. This may be 441 // Indicates whether the response should be sent in chunks. This may be
442 // needed for devices with limited memory resources. If true, the response 442 // needed for devices with limited memory resources. If true, the response
443 // will include one or more ClientToServerResponses, with the frist one 443 // will include one or more ClientToServerResponses, with the frist one
444 // containing GetUpdatesMetadataResponse, and the remaining ones, if any, 444 // containing GetUpdatesMetadataResponse, and the remaining ones, if any,
445 // containing GetUpdatesStreamingResponse. These ClientToServerResponses are 445 // containing GetUpdatesStreamingResponse. These ClientToServerResponses are
446 // delimited by a length prefix, which is encoded as a varint. 446 // delimited by a length prefix, which is encoded as a varint.
447 optional bool streaming = 7 [default = false]; 447 optional bool streaming = 7 [default = false];
448 448
449 // Whether the client needs the server to provide an encryption key for this
450 // account.
451 // Note: this should typically only be set on the first GetUpdates a client
452 // requests. Clients are expected to persist the encryption key from then on.
453 // The allowed frequency for requesting encryption keys is much lower than
454 // other datatypes, so repeated usage will likely result in throttling.
455 optional bool need_encryption_key = 8 [default = false];
456
449 // Whether to create the mobile bookmarks folder if it's not 457 // Whether to create the mobile bookmarks folder if it's not
450 // already created. Should be set to true only by mobile clients. 458 // already created. Should be set to true only by mobile clients.
451 optional bool create_mobile_bookmarks_folder = 1000 [default = false]; 459 optional bool create_mobile_bookmarks_folder = 1000 [default = false];
452 }; 460 };
453 461
454 message AuthenticateMessage { 462 message AuthenticateMessage {
455 required string auth_token = 1; 463 required string auth_token = 1;
456 }; 464 };
457 465
458 message ClientToServerMessage { 466 message ClientToServerMessage {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 // the batch, or if there were no new updates on the server; and the client 573 // the batch, or if there were no new updates on the server; and the client
566 // must save these. If the server does not provide a |new_progress_marker| 574 // must save these. If the server does not provide a |new_progress_marker|
567 // value for a particular datatype, when the request provided a 575 // value for a particular datatype, when the request provided a
568 // |from_progress_marker| value for that datatype, the client should 576 // |from_progress_marker| value for that datatype, the client should
569 // interpret this to mean "no change from the previous state" and retain its 577 // interpret this to mean "no change from the previous state" and retain its
570 // previous progress-marker value for that datatype. 578 // previous progress-marker value for that datatype.
571 // 579 //
572 // Progress markers in the context of a response will never have the 580 // Progress markers in the context of a response will never have the
573 // |timestamp_token_for_migration| field set. 581 // |timestamp_token_for_migration| field set.
574 repeated DataTypeProgressMarker new_progress_marker = 5; 582 repeated DataTypeProgressMarker new_progress_marker = 5;
583
584 // The current encryption key associated with this account. Only set if the
585 // GetUpdatesMessage in the request had need_encryption_key == true.
586 optional bytes encryption_key = 6;
575 }; 587 };
576 588
577 // The metadata response for GetUpdatesMessage. This response is sent when 589 // The metadata response for GetUpdatesMessage. This response is sent when
578 // streaming is set to true in the request. It is prefixed with a length 590 // streaming is set to true in the request. It is prefixed with a length
579 // delimiter, which is encoded in varint. 591 // delimiter, which is encoded in varint.
580 message GetUpdatesMetadataResponse { 592 message GetUpdatesMetadataResponse {
581 // Approximate count of changes remaining. Detailed comment is available in 593 // Approximate count of changes remaining. Detailed comment is available in
582 // GetUpdatesResponse. 594 // GetUpdatesResponse.
583 optional int64 changes_remaining = 1; 595 optional int64 changes_remaining = 1;
584 596
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 required double target_utilization = 2; 630 required double target_utilization = 2;
619 required double measure_interval_max = 3; 631 required double measure_interval_max = 3;
620 required double measure_interval_min = 4; 632 required double measure_interval_min = 4;
621 required double observation_window = 5; 633 required double observation_window = 5;
622 }; 634 };
623 635
624 message ClientToServerResponse { 636 message ClientToServerResponse {
625 optional CommitResponse commit = 1; 637 optional CommitResponse commit = 1;
626 optional GetUpdatesResponse get_updates = 2; 638 optional GetUpdatesResponse get_updates = 2;
627 optional AuthenticateResponse authenticate = 3; 639 optional AuthenticateResponse authenticate = 3;
628 // DEPRECATED - this field was never used in production.
629 // optional ClearUserDataResponse clear_user_data = 9;
630 optional GetUpdatesMetadataResponse stream_metadata = 10;
631 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse,
632 // none of the other fields (error_code and etc) will be set.
633 optional GetUpdatesStreamingResponse stream_data = 11;
634
635 message Error {
636 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN];
637 optional string error_description = 2;
638 optional string url = 3;
639 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION];
640
641 // Currently only meaningful if |error_type| is throttled. If this field
642 // is absent then the whole client (all datatypes) is throttled.
643 repeated int32 error_data_type_ids = 5;
644 }
645
646 optional Error error = 13;
647 640
648 // Up until protocol_version 24, the default was SUCCESS which made it 641 // Up until protocol_version 24, the default was SUCCESS which made it
649 // impossible to add new enum values since older clients would parse any 642 // impossible to add new enum values since older clients would parse any
650 // out-of-range value as SUCCESS. Starting with 25, unless explicitly set, 643 // out-of-range value as SUCCESS. Starting with 25, unless explicitly set,
651 // the error_code will be UNKNOWN so that clients know when they're 644 // the error_code will be UNKNOWN so that clients know when they're
652 // out-of-date. Note also that when using protocol_version < 25, 645 // out-of-date. Note also that when using protocol_version < 25,
653 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP 646 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP
654 // 400 error code. This is deprecated now. 647 // 400 error code. This is deprecated now.
655 optional SyncEnums.ErrorType error_code = 4 [default = UNKNOWN]; 648 optional SyncEnums.ErrorType error_code = 4 [default = UNKNOWN];
656 optional string error_message = 5; 649 optional string error_message = 5;
657 650
658 // Opaque store ID; if it changes, the contents of the client's cache 651 // Opaque store ID; if it changes, the contents of the client's cache
659 // is meaningless to this server. This happens most typically when 652 // is meaningless to this server. This happens most typically when
660 // you switch from one storage backend instance (say, a test instance) 653 // you switch from one storage backend instance (say, a test instance)
661 // to another (say, the official instance). 654 // to another (say, the official instance).
662 optional string store_birthday = 6; 655 optional string store_birthday = 6;
663 656
664 optional ClientCommand client_command = 7; 657 optional ClientCommand client_command = 7;
665 optional ProfilingData profiling_data = 8; 658 optional ProfilingData profiling_data = 8;
659 // DEPRECATED - this field was never used in production.
660 // optional ClearUserDataResponse clear_user_data = 9;
661 optional GetUpdatesMetadataResponse stream_metadata = 10;
662 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse,
663 // none of the other fields (error_code and etc) will be set.
664 optional GetUpdatesStreamingResponse stream_data = 11;
666 665
667 // The data types whose storage has been migrated. Present when the value of 666 // The data types whose storage has been migrated. Present when the value of
668 // error_code is MIGRATION_DONE. 667 // error_code is MIGRATION_DONE.
669 repeated int32 migrated_data_type_id = 12; 668 repeated int32 migrated_data_type_id = 12;
669
670 message Error {
671 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN];
672 optional string error_description = 2;
673 optional string url = 3;
674 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION];
675
676 // Currently only meaningful if |error_type| is throttled. If this field
677 // is absent then the whole client (all datatypes) is throttled.
678 repeated int32 error_data_type_ids = 5;
679 }
680 optional Error error = 13;
670 }; 681 };
671 682
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698