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.
5 // Sync protocol for communication between sync client and server.
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change
8 // any fields in this file.
12 option optimize_for = LITE_RUNTIME;
13 option retain_unknown_fields = true;
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
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.
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.
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
40 CONFIGURE_COMPLETE = 12; // The datatype manager has finished an
41 // at least partially successful
42 // configuration and is once again syncing
44 BOOTSTRAP_TOKEN_UPDATED = 13; // A new cryptographer bootstrap token was
48 // See ui/base/page_transition_types.h for detailed information on the
49 // values of PageTransition and PageTransitionRedirectType below.
51 // Types of transitions between pages.
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.
72 // Types of redirects that triggered a transition.
73 enum PageTransitionRedirectType {
80 ACCESS_DENIED = 1; // Returned when the user doesn't have access to
81 // store (instead of HTTP 401).
82 NOT_MY_BIRTHDAY = 2; // Returned when the server and client disagree on
83 // the store birthday.
84 THROTTLED = 3; // Returned when the store has exceeded the
85 // allowed bandwidth utilization.
86 AUTH_EXPIRED = 4; // Auth token or cookie has expired.
87 USER_NOT_ACTIVATED = 5; // User doesn't have the Chrome bit set on that
89 AUTH_INVALID = 6; // Auth token or cookie is otherwise invalid.
90 CLEAR_PENDING = 7; // A clear of the user data is pending (e.g.
91 // initiated by privacy request). Client should
93 TRANSIENT_ERROR = 8; // A transient error occured (eg. backend
94 // timeout). Client should try again later.
95 MIGRATION_DONE = 9; // Migration has finished for one or more data
96 // types. Client should clear the cache for
97 // these data types only and then re-sync with
99 DISABLED_BY_ADMIN = 10; // An administrator disabled sync for this domain.
100 USER_ROLLBACK = 11; // Client told to stop syncing and roll back.
101 PARTIAL_FAILURE = 12; // Return when client want to update several data
102 // types, but some of them failed(e.g. throttled).
103 UNKNOWN = 100; // Unknown value. This should never be explicitly
104 // used; it is the default value when an
105 // out-of-date client parses a value it doesn't
110 UPGRADE_CLIENT = 0; // Upgrade the client to latest version.
111 CLEAR_USER_DATA_AND_RESYNC = 1; // Clear user data from dashboard and
113 ENABLE_SYNC_ON_ACCOUNT = 2; // The administrator needs to enable sync
115 STOP_AND_RESTART_SYNC = 3; // Stop sync and set up sync again.
116 DISABLE_SYNC_ON_CLIENT = 4; // Wipe the client of all sync data and
118 UNKNOWN_ACTION = 5; // This is the default.
131 // This is the successor to GetUpdatesSource. It merges the "normal mode"
132 // values (LOCAL, NOTIFICATION and DATATYPE_REFRESH), which were never really
133 // mutually exclusive to being with, into the GU_TRIGGER value. It also
134 // drops support for some old values that are not supported by newer clients.
136 // Mind the gaps: Some values are intentionally unused because we want to
137 // keep the values in sync with GetUpdatesSource as much as possible. Please
138 // don't add any values < 12 unless there's a good reason for it.
140 // Introduced in M28.
141 enum GetUpdatesOrigin {
142 UNKNOWN_ORIGIN = 0; // The source was not set by the caller.
143 PERIODIC = 4; // The source of the update was periodic polling.
144 NEWLY_SUPPORTED_DATATYPE = 7; // The client is in configuration mode
145 // because it's syncing all datatypes, and
146 // support for a new datatype was recently
147 // released via a software auto-update.
148 MIGRATION = 8; // The client is in configuration mode because a
149 // MIGRATION_DONE error previously returned by the
150 // server necessitated resynchronization.
151 NEW_CLIENT = 9; // The client is in configuration mode because the
152 // user enabled sync for the first time. Not to be
153 // confused with FIRST_UPDATE.
154 RECONFIGURATION = 10; // The client is in configuration mode because the
155 // user opted to sync a different set of datatypes.
156 GU_TRIGGER = 12; // The client is in 'normal' mode. It may have several
157 // reasons for requesting an update. See the per-type
158 // GetUpdateTriggers message for more details.
159 RETRY = 13; // A retry GU to pick up updates missed by last GU due to
160 // replication delay, missing hints, etc.
161 PROGRAMMATIC = 14; // A GU to programmatically enable/disable a
162 // datatype, often due to error handling.