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

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: Rebase Created 8 years, 5 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 message GetEncryptionKeyMessage {
tim (not reviewing) 2012/07/19 21:42:03 Comments on the messages + fields.
Nicolas Zea 2012/07/24 22:51:24 Done.
459 }
460
461 message GetEncryptionKeyResponse {
462 optional bytes key = 1;
463 }
464
458 message ClientToServerMessage { 465 message ClientToServerMessage {
459 required string share = 1; 466 required string share = 1;
460 optional int32 protocol_version = 2 [default = 31]; 467 optional int32 protocol_version = 2 [default = 31];
461 enum Contents { 468 enum Contents {
462 COMMIT = 1; 469 COMMIT = 1;
463 GET_UPDATES = 2; 470 GET_UPDATES = 2;
464 AUTHENTICATE = 3; 471 AUTHENTICATE = 3;
465 CLEAR_DATA = 4; 472 CLEAR_DATA = 4;
473 GET_ENCRYPTION_KEY = 5;
466 } 474 }
467 475
468 required Contents message_contents = 3; 476 required Contents message_contents = 3;
469 optional CommitMessage commit = 4; 477 optional CommitMessage commit = 4;
470 optional GetUpdatesMessage get_updates = 5; 478 optional GetUpdatesMessage get_updates = 5;
471 optional AuthenticateMessage authenticate = 6; 479 optional AuthenticateMessage authenticate = 6;
472 480
473 // Request to clear all Chromium data from the server. 481 // Request to clear all Chromium data from the server.
474 // DEPRECATED - this field was never used in production. 482 // DEPRECATED - this field was never used in production.
475 // optional ClearUserDataMessage clear_user_data = 9; 483 // optional ClearUserDataMessage clear_user_data = 9;
476 484
477 optional string store_birthday = 7; // Opaque store ID; if it changes, duck! 485 optional string store_birthday = 7; // Opaque store ID; if it changes, duck!
478 // The client sets this if it detects a sync issue. The server will tell it 486 // The client sets this if it detects a sync issue. The server will tell it
479 // if it should perform a refresh. 487 // if it should perform a refresh.
480 optional bool sync_problem_detected = 8 [default = false]; 488 optional bool sync_problem_detected = 8 [default = false];
481 489
482 // Client side state information for debugging purpose. 490 // Client side state information for debugging purpose.
483 // This is only sent on the first getupdates of every sync cycle, 491 // This is only sent on the first getupdates of every sync cycle,
484 // as an optimization to save bandwidth. 492 // as an optimization to save bandwidth.
485 optional DebugInfo debug_info = 10; 493 optional DebugInfo debug_info = 10;
494
495 optional GetEncryptionKeyMessage get_encryption_key = 11;
486 }; 496 };
487 497
488 message CommitResponse { 498 message CommitResponse {
489 enum ResponseType { 499 enum ResponseType {
490 SUCCESS = 1; 500 SUCCESS = 1;
491 CONFLICT = 2; // You're out of date; update and check your data 501 CONFLICT = 2; // You're out of date; update and check your data
492 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR? 502 // TODO(ncarter): What's the difference between RETRY and TRANSIENT_ERROR?
493 RETRY = 3; // Someone has a conflicting, non-expired session open 503 RETRY = 3; // Someone has a conflicting, non-expired session open
494 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again 504 INVALID_MESSAGE = 4; // What the client sent was invalid, and trying again
495 // won't help. 505 // won't help.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 required double target_utilization = 2; 628 required double target_utilization = 2;
619 required double measure_interval_max = 3; 629 required double measure_interval_max = 3;
620 required double measure_interval_min = 4; 630 required double measure_interval_min = 4;
621 required double observation_window = 5; 631 required double observation_window = 5;
622 }; 632 };
623 633
624 message ClientToServerResponse { 634 message ClientToServerResponse {
625 optional CommitResponse commit = 1; 635 optional CommitResponse commit = 1;
626 optional GetUpdatesResponse get_updates = 2; 636 optional GetUpdatesResponse get_updates = 2;
627 optional AuthenticateResponse authenticate = 3; 637 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 638
648 // Up until protocol_version 24, the default was SUCCESS which made it 639 // 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 640 // 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, 641 // 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 642 // 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, 643 // out-of-date. Note also that when using protocol_version < 25,
653 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP 644 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP
654 // 400 error code. This is deprecated now. 645 // 400 error code. This is deprecated now.
655 optional SyncEnums.ErrorType error_code = 4 [default = UNKNOWN]; 646 optional SyncEnums.ErrorType error_code = 4 [default = UNKNOWN];
656 optional string error_message = 5; 647 optional string error_message = 5;
657 648
658 // Opaque store ID; if it changes, the contents of the client's cache 649 // Opaque store ID; if it changes, the contents of the client's cache
659 // is meaningless to this server. This happens most typically when 650 // is meaningless to this server. This happens most typically when
660 // you switch from one storage backend instance (say, a test instance) 651 // you switch from one storage backend instance (say, a test instance)
661 // to another (say, the official instance). 652 // to another (say, the official instance).
662 optional string store_birthday = 6; 653 optional string store_birthday = 6;
663 654
664 optional ClientCommand client_command = 7; 655 optional ClientCommand client_command = 7;
665 optional ProfilingData profiling_data = 8; 656 optional ProfilingData profiling_data = 8;
657 // DEPRECATED - this field was never used in production.
658 // optional ClearUserDataResponse clear_user_data = 9;
659 optional GetUpdatesMetadataResponse stream_metadata = 10;
660 // If GetUpdatesStreamingResponse is contained in the ClientToServerResponse,
661 // none of the other fields (error_code and etc) will be set.
662 optional GetUpdatesStreamingResponse stream_data = 11;
666 663
667 // The data types whose storage has been migrated. Present when the value of 664 // The data types whose storage has been migrated. Present when the value of
668 // error_code is MIGRATION_DONE. 665 // error_code is MIGRATION_DONE.
669 repeated int32 migrated_data_type_id = 12; 666 repeated int32 migrated_data_type_id = 12;
667
668 message Error {
669 optional SyncEnums.ErrorType error_type = 1 [default = UNKNOWN];
670 optional string error_description = 2;
671 optional string url = 3;
672 optional SyncEnums.Action action = 4 [default = UNKNOWN_ACTION];
673
674 // Currently only meaningful if |error_type| is throttled. If this field
675 // is absent then the whole client (all datatypes) is throttled.
676 repeated int32 error_data_type_ids = 5;
677 }
678 optional Error error = 13;
679
680 optional GetEncryptionKeyResponse get_encryption_key = 14;
670 }; 681 };
671 682
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698