• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10syntax = "proto2";
11
12option optimize_for = LITE_RUNTIME;
13option retain_unknown_fields = true;
14
15package sync_pb;
16
17message 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    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
88                              // Google Account.
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
92                              // come back later.
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
98                              // a server.
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    UNKNOWN            = 100; // Unknown value. This should never be explicitly
102                              // used; it is the default value when an
103                              // out-of-date client parses a value it doesn't
104                              // recognize.
105  }
106
107  enum Action {
108    UPGRADE_CLIENT              = 0; // Upgrade the client to latest version.
109    CLEAR_USER_DATA_AND_RESYNC  = 1; // Clear user data from dashboard and
110                                     // setup sync again.
111    ENABLE_SYNC_ON_ACCOUNT      = 2; // The administrator needs to enable sync
112                                     // on the account.
113    STOP_AND_RESTART_SYNC       = 3; // Stop sync and set up sync again.
114    DISABLE_SYNC_ON_CLIENT      = 4; // Wipe the client of all sync data and
115                                     // stop syncing.
116    UNKNOWN_ACTION              = 5; // This is the default.
117  }
118
119  enum DeviceType {
120    TYPE_WIN = 1;
121    TYPE_MAC = 2;
122    TYPE_LINUX = 3;
123    TYPE_CROS = 4;
124    TYPE_OTHER = 5;
125    TYPE_PHONE = 6;
126    TYPE_TABLET = 7;
127  }
128
129  // This is the successor to GetUpdatesSource.  It merges the "normal mode"
130  // values (LOCAL, NOTIFICATION and DATATYPE_REFRESH), which were never really
131  // mutually exclusive to being with, into the GU_TRIGGER value.  It also
132  // drops support for some old values that are not supported by newer clients.
133  //
134  // Mind the gaps: Some values are intentionally unused because we want to
135  // keep the values in sync with GetUpdatesSource as much as possible.  Please
136  // don't add any values < 12 unless there's a good reason for it.
137  //
138  // Introduced in M28.
139  enum GetUpdatesOrigin {
140    UNKNOWN_ORIGIN = 0;  // The source was not set by the caller.
141    PERIODIC = 4;  // The source of the update was periodic polling.
142    NEWLY_SUPPORTED_DATATYPE = 7;   // The client is in configuration mode
143                                    // because it's syncing all datatypes, and
144                                    // support for a new datatype was recently
145                                    // released via a software auto-update.
146    MIGRATION = 8;         // The client is in configuration mode because a
147                           // MIGRATION_DONE error previously returned by the
148                           // server necessitated resynchronization.
149    NEW_CLIENT = 9;        // The client is in configuration mode because the
150                           // user enabled sync for the first time.  Not to be
151                           // confused with FIRST_UPDATE.
152    RECONFIGURATION = 10;  // The client is in configuration mode because the
153                           // user opted to sync a different set of datatypes.
154    GU_TRIGGER = 12;  // The client is in 'normal' mode.  It may have several
155                      // reasons for requesting an update.  See the per-type
156                      // GetUpdateTriggers message for more details.
157    RETRY = 13;  // A retry GU to pick up updates missed by last GU due to
158                 // replication delay, missing hints, etc.
159    PROGRAMMATIC = 14;     // A GU to programmatically enable/disable a
160                           // datatype, often due to error handling.
161  }
162}
163