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 content/public/common/page_transition_types.h for detailed
49 // information on the values of PageTransition and
50 // PageTransitionRedirectType below.
52 // Types of transitions between pages.
64 KEYWORD_GENERATED = 10;
65 // The below two were mistakenly added but never properly used. They are
66 // actually transition qualifiers, and are set independently of other
67 // qualifiers and of the main transitions. See session_specifics.proto for
68 // the list of synced transition qualifiers.
69 // CHAIN_START = 12; Deprecated.
70 // CHAIN_END = 13; Deprecated.
73 // Types of redirects that triggered a transition.
74 enum PageTransitionRedirectType {
81 ACCESS_DENIED = 1; // Returned when the user doesn't have access to
82 // store (instead of HTTP 401).
83 NOT_MY_BIRTHDAY = 2; // Returned when the server and client disagree on
84 // the store birthday.
85 THROTTLED = 3; // Returned when the store has exceeded the
86 // allowed bandwidth utilization.
87 AUTH_EXPIRED = 4; // Auth token or cookie has expired.
88 USER_NOT_ACTIVATED = 5; // User doesn't have the Chrome bit set on that
90 AUTH_INVALID = 6; // Auth token or cookie is otherwise invalid.
91 CLEAR_PENDING = 7; // A clear of the user data is pending (e.g.
92 // initiated by privacy request). Client should
94 TRANSIENT_ERROR = 8; // A transient error occured (eg. backend
95 // timeout). Client should try again later.
96 MIGRATION_DONE = 9; // Migration has finished for one or more data
97 // types. Client should clear the cache for
98 // these data types only and then re-sync with
100 DISABLED_BY_ADMIN = 10; // An administrator disabled sync for this domain.
101 USER_ROLLBACK = 11; // Client told to stop syncing and roll back.
102 UNKNOWN = 100; // Unknown value. This should never be explicitly
103 // used; it is the default value when an
104 // out-of-date client parses a value it doesn't
109 UPGRADE_CLIENT = 0; // Upgrade the client to latest version.
110 CLEAR_USER_DATA_AND_RESYNC = 1; // Clear user data from dashboard and
112 ENABLE_SYNC_ON_ACCOUNT = 2; // The administrator needs to enable sync
114 STOP_AND_RESTART_SYNC = 3; // Stop sync and set up sync again.
115 DISABLE_SYNC_ON_CLIENT = 4; // Wipe the client of all sync data and
117 UNKNOWN_ACTION = 5; // This is the default.
130 // This is the successor to GetUpdatesSource. It merges the "normal mode"
131 // values (LOCAL, NOTIFICATION and DATATYPE_REFRESH), which were never really
132 // mutually exclusive to being with, into the GU_TRIGGER value. It also
133 // drops support for some old values that are not supported by newer clients.
135 // Mind the gaps: Some values are intentionally unused because we want to
136 // keep the values in sync with GetUpdatesSource as much as possible. Please
137 // don't add any values < 12 unless there's a good reason for it.
139 // Introduced in M28.
140 enum GetUpdatesOrigin {
141 UNKNOWN_ORIGIN = 0; // The source was not set by the caller.
142 PERIODIC = 4; // The source of the update was periodic polling.
143 NEWLY_SUPPORTED_DATATYPE = 7; // The client is in configuration mode
144 // because it's syncing all datatypes, and
145 // support for a new datatype was recently
146 // released via a software auto-update.
147 MIGRATION = 8; // The client is in configuration mode because a
148 // MIGRATION_DONE error previously returned by the
149 // server necessitated resynchronization.
150 NEW_CLIENT = 9; // The client is in configuration mode because the
151 // user enabled sync for the first time. Not to be
152 // confused with FIRST_UPDATE.
153 RECONFIGURATION = 10; // The client is in configuration mode because the
154 // user opted to sync a different set of datatypes.
155 GU_TRIGGER = 12; // The client is in 'normal' mode. It may have several
156 // reasons for requesting an update. See the per-type
157 // GetUpdateTriggers message for more details.
158 RETRY = 13; // A retry GU to pick up updates missed by last GU due to
159 // replication delay, missing hints, etc.