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

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

Issue 7621085: Server directed error handling backend code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload before commit. Created 9 years, 3 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) 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";
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 // timeout). Client should try again later. 620 // timeout). Client should try again later.
621 MIGRATION_DONE = 9; // Migration has finished for one or more data 621 MIGRATION_DONE = 9; // Migration has finished for one or more data
622 // types. Client should clear the cache for 622 // types. Client should clear the cache for
623 // these data types only and then re-sync with 623 // these data types only and then re-sync with
624 // a server. 624 // a server.
625 UNKNOWN = 100; // Unknown value. This should never be explicitly 625 UNKNOWN = 100; // Unknown value. This should never be explicitly
626 // used; it is the default value when an 626 // used; it is the default value when an
627 // out-of-date client parses a value it doesn't 627 // out-of-date client parses a value it doesn't
628 // recognize. 628 // recognize.
629 } 629 }
630
631 message Error {
632 optional ErrorType error_type = 1 [default = UNKNOWN];
633 optional string error_description = 2;
634 optional string url = 3;
635 enum Action {
636 UPGRADE_CLIENT = 0; // Upgrade the client to latest version.
637 CLEAR_USER_DATA_AND_RESYNC = 1; // Clear user data from dashboard and
638 // setup sync again.
639 ENABLE_SYNC_ON_ACCOUNT = 2; // The administrator needs to enable sync
640 // on the account.
641 STOP_AND_RESTART_SYNC = 3; // Stop sync and set up sync again.
642 DISABLE_SYNC_ON_CLIENT = 4; // Wipe the client of all sync data and
643 // stop syncing.
644 UNKNOWN_ACTION = 5; // This is the default.
645 }
646 optional Action action = 4 [default = UNKNOWN_ACTION];
647 }
648
649 optional Error error = 13;
650
630 // Up until protocol_version 24, the default was SUCCESS which made it 651 // Up until protocol_version 24, the default was SUCCESS which made it
631 // impossible to add new enum values since older clients would parse any 652 // impossible to add new enum values since older clients would parse any
632 // out-of-range value as SUCCESS. Starting with 25, unless explicitly set, 653 // out-of-range value as SUCCESS. Starting with 25, unless explicitly set,
633 // the error_code will be UNKNOWN so that clients know when they're 654 // the error_code will be UNKNOWN so that clients know when they're
634 // out-of-date. Note also that when using protocol_version < 25, 655 // out-of-date. Note also that when using protocol_version < 25,
635 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP 656 // TRANSIENT_ERROR is not supported. Instead, the server sends back a HTTP
636 // 400 error code. 657 // 400 error code. This is deprecated now.
637 optional ErrorType error_code = 4 [default = UNKNOWN]; 658 optional ErrorType error_code = 4 [default = UNKNOWN];
638 optional string error_message = 5; 659 optional string error_message = 5;
639 660
640 // Opaque store ID; if it changes, the contents of the client's cache 661 // Opaque store ID; if it changes, the contents of the client's cache
641 // is meaningless to this server. This happens most typically when 662 // is meaningless to this server. This happens most typically when
642 // you switch from one storage backend instance (say, a test instance) 663 // you switch from one storage backend instance (say, a test instance)
643 // to another (say, the official instance). 664 // to another (say, the official instance).
644 optional string store_birthday = 6; 665 optional string store_birthday = 6;
645 666
646 optional ClientCommand client_command = 7; 667 optional ClientCommand client_command = 7;
647 optional ProfilingData profiling_data = 8; 668 optional ProfilingData profiling_data = 8;
648 669
649 // 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
650 // error_code is MIGRATION_DONE. 671 // error_code is MIGRATION_DONE.
651 repeated int32 migrated_data_type_id = 12; 672 repeated int32 migrated_data_type_id = 12;
652 }; 673 };
653 674
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/protocol/sync_protocol_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698