OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 // | |
5 // Sync protocol for communication between sync client and server. | |
6 | |
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | |
8 // any fields in this file. | |
9 | |
10 syntax = "proto2"; | |
11 | |
12 option optimize_for = LITE_RUNTIME; | |
13 option retain_unknown_fields = true; | |
14 | |
15 package sync_pb; | |
16 | |
17 message SyncEnums { | |
18 // These events are sent by the DebugInfo class for singleton events. | |
19 enum SingletonDebugEventType { | |
20 CONNECTION_STATUS_CHANGE = 1; // Connection status change. Note this | |
21 // gets generated even during a successful | |
22 // connection. | |
23 UPDATED_TOKEN = 2; // Client received an updated token. | |
24 PASSPHRASE_REQUIRED = 3; // Cryptographer needs passphrase. | |
25 PASSPHRASE_ACCEPTED = 4; // Passphrase was accepted by cryptographer. | |
26 INITIALIZATION_COMPLETE = 5; // Sync Initialization is complete. | |
27 | |
28 // |STOP_SYNCING_PERMANENTLY| event should never be seen by the server in | |
29 // the absence of bugs. | |
30 STOP_SYNCING_PERMANENTLY = 6; // Server sent stop syncing permanently. | |
31 | |
32 ENCRYPTION_COMPLETE = 7; // Client has finished encrypting all data. | |
33 ACTIONABLE_ERROR = 8; // Client received an actionable error. | |
34 ENCRYPTED_TYPES_CHANGED = 9; // Set of encrypted types has changed. | |
35 // NOTE: until m25 bootstrap token updated also | |
36 // shared this field (erroneously). | |
37 PASSPHRASE_TYPE_CHANGED = 10; // The encryption passphrase state changed. | |
38 KEYSTORE_TOKEN_UPDATED = 11; // A new keystore encryption token was | |
39 // persisted. | |
40 CONFIGURE_COMPLETE = 12; // The datatype manager has finished an | |
41 // at least partially successful | |
42 // configuration and is once again syncing | |
43 // with the server. | |
44 BOOTSTRAP_TOKEN_UPDATED = 13; // A new cryptographer bootstrap token was | |
45 // generated. | |
46 } | |
47 | |
48 // See ui/base/page_transition_types.h for detailed information on the | |
49 // values of PageTransition and PageTransitionRedirectType below. | |
50 | |
51 // Types of transitions between pages. | |
52 enum PageTransition { | |
53 LINK = 0; | |
54 TYPED = 1; | |
55 AUTO_BOOKMARK = 2; | |
56 AUTO_SUBFRAME = 3; | |
57 MANUAL_SUBFRAME = 4; | |
58 GENERATED = 5; | |
59 AUTO_TOPLEVEL = 6; | |
60 FORM_SUBMIT = 7; | |
61 RELOAD = 8; | |
62 KEYWORD = 9; | |
63 KEYWORD_GENERATED = 10; | |
64 // The below two were mistakenly added but never properly used. They are | |
65 // actually transition qualifiers, and are set independently of other | |
66 // qualifiers and of the main transitions. See session_specifics.proto for | |
67 // the list of synced transition qualifiers. | |
68 // CHAIN_START = 12; Deprecated. | |
69 // CHAIN_END = 13; Deprecated. | |
70 } | |
71 | |
72 // Types of redirects that triggered a transition. | |
73 enum PageTransitionRedirectType { | |
74 CLIENT_REDIRECT = 1; | |
75 SERVER_REDIRECT = 2; | |
76 } | |
77 | |
78 enum ErrorType { | |
79 SUCCESS = 0; | |
80 DEPRECATED_ACCESS_DENIED = 1; | |
81 NOT_MY_BIRTHDAY = 2; // Returned when the server and client disagree | |
82 // on the store birthday. | |
83 THROTTLED = 3; // Returned when the store has exceeded the | |
84 // allowed bandwidth utilization. | |
85 DEPRECATED_AUTH_EXPIRED = 4; | |
86 DEPRECATED_USER_NOT_ACTIVATED = 5; | |
87 DEPRECATED_AUTH_INVALID = 6; | |
88 CLEAR_PENDING = 7; // A clear of the user data is pending (e.g. | |
89 // initiated by privacy request). Client should | |
90 // come back later. | |
91 TRANSIENT_ERROR = 8; // A transient error occured (eg. backend | |
92 // timeout). Client should try again later. | |
93 MIGRATION_DONE = 9; // Migration has finished for one or more data | |
94 // types. Client should clear the cache for | |
95 // these data types only and then re-sync with | |
96 // a server. | |
97 DISABLED_BY_ADMIN = 10; // An administrator disabled sync for this | |
98 // domain. | |
99 DEPRECATED_USER_ROLLBACK = 11; // Deprecated in M50. | |
100 PARTIAL_FAILURE = 12; // Return when client want to update several | |
101 // data types, but some of them failed(e.g. | |
102 // throttled). | |
103 CLIENT_DATA_OBSOLETE = 13; // Returned when server detects that this | |
104 // client's data is obsolete. Client should | |
105 // reset local data and restart syncing. | |
106 UNKNOWN = 100; // Unknown value. This should never be | |
107 // explicitly used; it is the default value when | |
108 // an out-of-date client parses a value it | |
109 // doesn't recognize. | |
110 } | |
111 | |
112 enum Action { | |
113 UPGRADE_CLIENT = 0; // Upgrade the client to latest version. | |
114 CLEAR_USER_DATA_AND_RESYNC = 1; // Clear user data from dashboard and | |
115 // setup sync again. | |
116 ENABLE_SYNC_ON_ACCOUNT = 2; // The administrator needs to enable sync | |
117 // on the account. | |
118 STOP_AND_RESTART_SYNC = 3; // Stop sync and set up sync again. | |
119 DISABLE_SYNC_ON_CLIENT = 4; // Wipe the client of all sync data and | |
120 // stop syncing. | |
121 UNKNOWN_ACTION = 5; // This is the default. | |
122 } | |
123 | |
124 enum DeviceType { | |
125 TYPE_WIN = 1; | |
126 TYPE_MAC = 2; | |
127 TYPE_LINUX = 3; | |
128 TYPE_CROS = 4; | |
129 TYPE_OTHER = 5; | |
130 TYPE_PHONE = 6; | |
131 TYPE_TABLET = 7; | |
132 } | |
133 | |
134 // This is the successor to GetUpdatesSource. It merges the "normal mode" | |
135 // values (LOCAL, NOTIFICATION and DATATYPE_REFRESH), which were never really | |
136 // mutually exclusive to being with, into the GU_TRIGGER value. It also | |
137 // drops support for some old values that are not supported by newer clients. | |
138 // | |
139 // Mind the gaps: Some values are intentionally unused because we want to | |
140 // keep the values in sync with GetUpdatesSource as much as possible. Please | |
141 // don't add any values < 12 unless there's a good reason for it. | |
142 // | |
143 // Introduced in M28. | |
144 enum GetUpdatesOrigin { | |
145 UNKNOWN_ORIGIN = 0; // The source was not set by the caller. | |
146 PERIODIC = 4; // The source of the update was periodic polling. | |
147 NEWLY_SUPPORTED_DATATYPE = 7; // The client is in configuration mode | |
148 // because it's syncing all datatypes, and | |
149 // support for a new datatype was recently | |
150 // released via a software auto-update. | |
151 MIGRATION = 8; // The client is in configuration mode because a | |
152 // MIGRATION_DONE error previously returned by the | |
153 // server necessitated resynchronization. | |
154 NEW_CLIENT = 9; // The client is in configuration mode because the | |
155 // user enabled sync for the first time. Not to be | |
156 // confused with FIRST_UPDATE. | |
157 RECONFIGURATION = 10; // The client is in configuration mode because the | |
158 // user opted to sync a different set of datatypes. | |
159 GU_TRIGGER = 12; // The client is in 'normal' mode. It may have several | |
160 // reasons for requesting an update. See the per-type | |
161 // GetUpdateTriggers message for more details. | |
162 RETRY = 13; // A retry GU to pick up updates missed by last GU due to | |
163 // replication delay, missing hints, etc. | |
164 PROGRAMMATIC = 14; // A GU to programmatically enable/disable a | |
165 // datatype, often due to error handling. | |
166 } | |
167 } | |
OLD | NEW |