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

Side by Side Diff: sync/internal_api/sync_manager.h

Issue 10534080: sync: move internal_api components used by chrome/browser into internal_api/public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: init Created 8 years, 6 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
(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 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/callback_forward.h"
13 #include "base/file_path.h"
14 #include "base/memory/ref_counted.h"
15 #include "base/task_runner.h"
16 #include "base/threading/thread_checker.h"
17 #include "base/time.h"
18 #include "sync/internal_api/change_record.h"
19 #include "sync/internal_api/configure_reason.h"
20 #include "sync/internal_api/public/engine/model_safe_worker.h"
21 #include "sync/internal_api/public/syncable/model_type.h"
22 #include "sync/protocol/sync_protocol_error.h"
23 #include "sync/util/report_unrecoverable_error_function.h"
24 #include "sync/util/unrecoverable_error_handler.h"
25 #include "sync/util/weak_handle.h"
26
27 namespace browser_sync {
28 class Encryptor;
29 struct Experiments;
30 class ExtensionsActivityMonitor;
31 class JsBackend;
32 class JsEventHandler;
33
34 namespace sessions {
35 class SyncSessionSnapshot;
36 } // namespace sessions
37 } // namespace browser_sync
38
39 namespace sync_notifier {
40 class SyncNotifier;
41 } // namespace sync_notifier
42
43 namespace sync_pb {
44 class EncryptedData;
45 } // namespace sync_pb
46
47 namespace sync_api {
48
49 class BaseTransaction;
50 class HttpPostProviderFactory;
51 struct UserShare;
52
53 // Used by SyncManager::OnConnectionStatusChange().
54 enum ConnectionStatus {
55 CONNECTION_OK,
56 CONNECTION_AUTH_ERROR,
57 CONNECTION_SERVER_ERROR
58 };
59
60 // Reasons due to which browser_sync::Cryptographer might require a passphrase.
61 enum PassphraseRequiredReason {
62 REASON_PASSPHRASE_NOT_REQUIRED = 0, // Initial value.
63 REASON_ENCRYPTION = 1, // The cryptographer requires a
64 // passphrase for its first attempt at
65 // encryption. Happens only during
66 // migration or upgrade.
67 REASON_DECRYPTION = 2, // The cryptographer requires a
68 // passphrase for its first attempt at
69 // decryption.
70 };
71
72
73 // Contains everything needed to talk to and identify a user account.
74 struct SyncCredentials {
75 std::string email;
76 std::string sync_token;
77 };
78
79 // SyncManager encapsulates syncable::Directory and serves as the parent of all
80 // other objects in the sync API. If multiple threads interact with the same
81 // local sync repository (i.e. the same sqlite database), they should share a
82 // single SyncManager instance. The caller should typically create one
83 // SyncManager for the lifetime of a user session.
84 //
85 // Unless stated otherwise, all methods of SyncManager should be called on the
86 // same thread.
87 class SyncManager {
88 public:
89 // SyncInternal contains the implementation of SyncManager, while abstracting
90 // internal types from clients of the interface.
91 class SyncInternal;
92
93 // Status encapsulates detailed state about the internals of the SyncManager.
94 struct Status {
95 Status();
96 ~Status();
97
98 bool notifications_enabled; // True only if subscribed for notifications.
99
100 // Notifications counters updated by the actions in synapi.
101 int notifications_received;
102
103 browser_sync::SyncProtocolError sync_protocol_error;
104
105 // Number of encryption conflicts counted during most recent sync cycle.
106 int encryption_conflicts;
107
108 // Number of hierarchy conflicts counted during most recent sync cycle.
109 int hierarchy_conflicts;
110
111 // Number of simple conflicts counted during most recent sync cycle.
112 int simple_conflicts;
113
114 // Number of items the server refused to commit due to conflict during most
115 // recent sync cycle.
116 int server_conflicts;
117
118 // Number of items successfully committed during most recent sync cycle.
119 int committed_count;
120
121 bool syncing;
122 // True after a client has done a first sync.
123 bool initial_sync_ended;
124
125 // Total updates available. If zero, nothing left to download.
126 int64 updates_available;
127 // Total updates received by the syncer since browser start.
128 int updates_received;
129 // Total updates received that are echoes of our own changes.
130 int reflected_updates_received;
131 // Of updates_received, how many were tombstones.
132 int tombstone_updates_received;
133
134 // Total successful commits.
135 int num_commits_total;
136
137 // Total number of overwrites due to conflict resolver since browser start.
138 int num_local_overwrites_total;
139 int num_server_overwrites_total;
140
141 // Count of empty and non empty getupdates;
142 int nonempty_get_updates;
143 int empty_get_updates;
144
145 // Count of sync cycles that successfully committed items;
146 int sync_cycles_with_commits;
147 int sync_cycles_without_commits;
148
149 // Count of useless and useful syncs we perform.
150 int useless_sync_cycles;
151 int useful_sync_cycles;
152
153 // Encryption related.
154 syncable::ModelTypeSet encrypted_types;
155 bool cryptographer_ready;
156 bool crypto_has_pending_keys;
157
158 // The unique identifer for this client.
159 std::string unique_id;
160 };
161
162 // An interface the embedding application implements to be notified
163 // on change events. Note that these methods may be called on *any*
164 // thread.
165 class ChangeDelegate {
166 public:
167 // Notify the delegate that changes have been applied to the sync model.
168 //
169 // This will be invoked on the same thread as on which ApplyChanges was
170 // called. |changes| is an array of size |change_count|, and contains the
171 // ID of each individual item that was changed. |changes| exists only for
172 // the duration of the call. If items of multiple data types change at
173 // the same time, this method is invoked once per data type and |changes|
174 // is restricted to items of the ModelType indicated by |model_type|.
175 // Because the observer is passed a |trans|, the observer can assume a
176 // read lock on the sync model that will be released after the function
177 // returns.
178 //
179 // The SyncManager constructs |changes| in the following guaranteed order:
180 //
181 // 1. Deletions, from leaves up to parents.
182 // 2. Updates to existing items with synced parents & predecessors.
183 // 3. New items with synced parents & predecessors.
184 // 4. Items with parents & predecessors in |changes|.
185 // 5. Repeat #4 until all items are in |changes|.
186 //
187 // Thus, an implementation of OnChangesApplied should be able to
188 // process the change records in the order without having to worry about
189 // forward dependencies. But since deletions come before reparent
190 // operations, a delete may temporarily orphan a node that is
191 // updated later in the list.
192 virtual void OnChangesApplied(
193 syncable::ModelType model_type,
194 const BaseTransaction* trans,
195 const ImmutableChangeRecordList& changes) = 0;
196
197 // OnChangesComplete gets called when the TransactionComplete event is
198 // posted (after OnChangesApplied finishes), after the transaction lock
199 // and the change channel mutex are released.
200 //
201 // The purpose of this function is to support processors that require
202 // split-transactions changes. For example, if a model processor wants to
203 // perform blocking I/O due to a change, it should calculate the changes
204 // while holding the transaction lock (from within OnChangesApplied), buffer
205 // those changes, let the transaction fall out of scope, and then commit
206 // those changes from within OnChangesComplete (postponing the blocking
207 // I/O to when it no longer holds any lock).
208 virtual void OnChangesComplete(syncable::ModelType model_type) = 0;
209
210 protected:
211 virtual ~ChangeDelegate();
212 };
213
214 // Like ChangeDelegate, except called only on the sync thread and
215 // not while a transaction is held. For objects that want to know
216 // when changes happen, but don't need to process them.
217 class ChangeObserver {
218 public:
219 // Ids referred to in |changes| may or may not be in the write
220 // transaction specified by |write_transaction_id|. If they're
221 // not, that means that the node didn't actually change, but we
222 // marked them as changed for some other reason (e.g., siblings of
223 // re-ordered nodes).
224 //
225 // TODO(sync, long-term): Ideally, ChangeDelegate/Observer would
226 // be passed a transformed version of EntryKernelMutation instead
227 // of a transaction that would have to be used to look up the
228 // changed nodes. That is, ChangeDelegate::OnChangesApplied()
229 // would still be called under the transaction, but all the needed
230 // data will be passed down.
231 //
232 // Even more ideally, we would have sync semantics such that we'd
233 // be able to apply changes without being under a transaction.
234 // But that's a ways off...
235 virtual void OnChangesApplied(
236 syncable::ModelType model_type,
237 int64 write_transaction_id,
238 const ImmutableChangeRecordList& changes) = 0;
239
240 virtual void OnChangesComplete(syncable::ModelType model_type) = 0;
241
242 protected:
243 virtual ~ChangeObserver();
244 };
245
246 // An interface the embedding application implements to receive
247 // notifications from the SyncManager. Register an observer via
248 // SyncManager::AddObserver. All methods are called only on the
249 // sync thread.
250 class Observer {
251 public:
252 // A round-trip sync-cycle took place and the syncer has resolved any
253 // conflicts that may have arisen.
254 virtual void OnSyncCycleCompleted(
255 const browser_sync::sessions::SyncSessionSnapshot& snapshot) = 0;
256
257 // Called when the status of the connection to the sync server has
258 // changed.
259 virtual void OnConnectionStatusChange(ConnectionStatus status) = 0;
260
261 // Called when a new auth token is provided by the sync server.
262 virtual void OnUpdatedToken(const std::string& token) = 0;
263
264 // Called when user interaction is required to obtain a valid passphrase.
265 // - If the passphrase is required for encryption, |reason| will be
266 // REASON_ENCRYPTION.
267 // - If the passphrase is required for the decryption of data that has
268 // already been encrypted, |reason| will be REASON_DECRYPTION.
269 // - If the passphrase is required because decryption failed, and a new
270 // passphrase is required, |reason| will be REASON_SET_PASSPHRASE_FAILED.
271 //
272 // |pending_keys| is a copy of the cryptographer's pending keys, that may be
273 // cached by the frontend for subsequent use by the UI.
274 virtual void OnPassphraseRequired(
275 PassphraseRequiredReason reason,
276 const sync_pb::EncryptedData& pending_keys) = 0;
277
278 // Called when the passphrase provided by the user has been accepted and is
279 // now used to encrypt sync data.
280 virtual void OnPassphraseAccepted() = 0;
281
282 // |bootstrap_token| is an opaque base64 encoded representation of the key
283 // generated by the current passphrase, and is provided to the observer for
284 // persistence purposes and use in a future initialization of sync (e.g.
285 // after restart). The boostrap token will always be derived from the most
286 // recent GAIA password (for accounts with implicit passphrases), even if
287 // the data is still encrypted with an older GAIA password. For accounts
288 // with explicit passphrases, it will be the most recently seen custom
289 // passphrase.
290 virtual void OnBootstrapTokenUpdated(
291 const std::string& bootstrap_token) = 0;
292
293 // Called when initialization is complete to the point that SyncManager can
294 // process changes. This does not necessarily mean authentication succeeded
295 // or that the SyncManager is online.
296 // IMPORTANT: Creating any type of transaction before receiving this
297 // notification is illegal!
298 // WARNING: Calling methods on the SyncManager before receiving this
299 // message, unless otherwise specified, produces undefined behavior.
300 //
301 // |js_backend| is what about:sync interacts with. It can emit
302 // the following events:
303
304 /**
305 * @param {{ enabled: boolean }} details A dictionary containing:
306 * - enabled: whether or not notifications are enabled.
307 */
308 // function onNotificationStateChange(details);
309
310 /**
311 * @param {{ changedTypes: Array.<string> }} details A dictionary
312 * containing:
313 * - changedTypes: a list of types (as strings) for which there
314 are new updates.
315 */
316 // function onIncomingNotification(details);
317
318 // Also, it responds to the following messages (all other messages
319 // are ignored):
320
321 /**
322 * Gets the current notification state.
323 *
324 * @param {function(boolean)} callback Called with whether or not
325 * notifications are enabled.
326 */
327 // function getNotificationState(callback);
328
329 /**
330 * Gets details about the root node.
331 *
332 * @param {function(!Object)} callback Called with details about the
333 * root node.
334 */
335 // TODO(akalin): Change this to getRootNodeId or eliminate it
336 // entirely.
337 // function getRootNodeDetails(callback);
338
339 /**
340 * Gets summary information for a list of ids.
341 *
342 * @param {Array.<string>} idList List of 64-bit ids in decimal
343 * string form.
344 * @param {Array.<{id: string, title: string, isFolder: boolean}>}
345 * callback Called with summaries for the nodes in idList that
346 * exist.
347 */
348 // function getNodeSummariesById(idList, callback);
349
350 /**
351 * Gets detailed information for a list of ids.
352 *
353 * @param {Array.<string>} idList List of 64-bit ids in decimal
354 * string form.
355 * @param {Array.<!Object>} callback Called with detailed
356 * information for the nodes in idList that exist.
357 */
358 // function getNodeDetailsById(idList, callback);
359
360 /**
361 * Gets child ids for a given id.
362 *
363 * @param {string} id 64-bit id in decimal string form of the parent
364 * node.
365 * @param {Array.<string>} callback Called with the (possibly empty)
366 * list of child ids.
367 */
368 // function getChildNodeIds(id);
369
370 virtual void OnInitializationComplete(
371 const browser_sync::WeakHandle<browser_sync::JsBackend>&
372 js_backend, bool success) = 0;
373
374 // We are no longer permitted to communicate with the server. Sync should
375 // be disabled and state cleaned up at once. This can happen for a number
376 // of reasons, e.g. swapping from a test instance to production, or a
377 // global stop syncing operation has wiped the store.
378 virtual void OnStopSyncingPermanently() = 0;
379
380 // After a request to clear server data, these callbacks are invoked to
381 // indicate success or failure.
382 virtual void OnClearServerDataSucceeded() = 0;
383 virtual void OnClearServerDataFailed() = 0;
384
385 // Called when the set of encrypted types or the encrypt
386 // everything flag has been changed. Note that encryption isn't
387 // complete until the OnEncryptionComplete() notification has been
388 // sent (see below).
389 //
390 // |encrypted_types| will always be a superset of
391 // Cryptographer::SensitiveTypes(). If |encrypt_everything| is
392 // true, |encrypted_types| will be the set of all known types.
393 //
394 // Until this function is called, observers can assume that the
395 // set of encrypted types is Cryptographer::SensitiveTypes() and
396 // that the encrypt everything flag is false.
397 //
398 // Called from within a transaction.
399 virtual void OnEncryptedTypesChanged(
400 syncable::ModelTypeSet encrypted_types,
401 bool encrypt_everything) = 0;
402
403 // Called after we finish encrypting the current set of encrypted
404 // types.
405 //
406 // Called from within a transaction.
407 virtual void OnEncryptionComplete() = 0;
408
409 virtual void OnActionableError(
410 const browser_sync::SyncProtocolError& sync_protocol_error) = 0;
411
412 protected:
413 virtual ~Observer();
414 };
415
416 enum TestingMode {
417 NON_TEST,
418 TEST_ON_DISK,
419 TEST_IN_MEMORY,
420 };
421
422 // Create an uninitialized SyncManager. Callers must Init() before using.
423 explicit SyncManager(const std::string& name);
424 virtual ~SyncManager();
425
426 // Initialize the sync manager. |database_location| specifies the path of
427 // the directory in which to locate a sqlite repository storing the syncer
428 // backend state. Initialization will open the database, or create it if it
429 // does not already exist. Returns false on failure.
430 // |event_handler| is the JsEventHandler used to propagate events to
431 // chrome://sync-internals. |event_handler| may be uninitialized.
432 // |sync_server_and_path| and |sync_server_port| represent the Chrome sync
433 // server to use, and |use_ssl| specifies whether to communicate securely;
434 // the default is false.
435 // |blocking_task_runner| is a TaskRunner to be used for tasks that
436 // may block on disk I/O.
437 // |post_factory| will be owned internally and used to create
438 // instances of an HttpPostProvider.
439 // |model_safe_worker| ownership is given to the SyncManager.
440 // |user_agent| is a 7-bit ASCII string suitable for use as the User-Agent
441 // HTTP header. Used internally when collecting stats to classify clients.
442 // |sync_notifier| is owned and used to listen for notifications.
443 // |report_unrecoverable_error_function| may be NULL.
444 bool Init(const FilePath& database_location,
445 const browser_sync::WeakHandle<browser_sync::JsEventHandler>&
446 event_handler,
447 const std::string& sync_server_and_path,
448 int sync_server_port,
449 bool use_ssl,
450 const scoped_refptr<base::TaskRunner>& blocking_task_runner,
451 HttpPostProviderFactory* post_factory,
452 const browser_sync::ModelSafeRoutingInfo& model_safe_routing_info,
453 const std::vector<browser_sync::ModelSafeWorker*>& workers,
454 browser_sync::ExtensionsActivityMonitor*
455 extensions_activity_monitor,
456 ChangeDelegate* change_delegate,
457 const std::string& user_agent,
458 const SyncCredentials& credentials,
459 sync_notifier::SyncNotifier* sync_notifier,
460 const std::string& restored_key_for_bootstrapping,
461 TestingMode testing_mode,
462 browser_sync::Encryptor* encryptor,
463 browser_sync::UnrecoverableErrorHandler*
464 unrecoverable_error_handler,
465 browser_sync::ReportUnrecoverableErrorFunction
466 report_unrecoverable_error_function);
467
468 // Throw an unrecoverable error from a transaction (mostly used for
469 // testing).
470 void ThrowUnrecoverableError();
471
472 // Returns the set of types for which we have stored some sync data.
473 syncable::ModelTypeSet InitialSyncEndedTypes();
474
475 // Update tokens that we're using in Sync. Email must stay the same.
476 void UpdateCredentials(const SyncCredentials& credentials);
477
478 // Called when the user disables or enables a sync type.
479 void UpdateEnabledTypes(const syncable::ModelTypeSet& enabled_types);
480
481 // Put the syncer in normal mode ready to perform nudges and polls.
482 void StartSyncingNormally(
483 const browser_sync::ModelSafeRoutingInfo& routing_info);
484
485 // Attempts to re-encrypt encrypted data types using the passphrase provided.
486 // Notifies observers of the result of the operation via OnPassphraseAccepted
487 // or OnPassphraseRequired, updates the nigori node, and does re-encryption as
488 // appropriate. If an explicit password has been set previously, we drop
489 // subsequent requests to set a passphrase. If the cryptographer has pending
490 // keys, and a new implicit passphrase is provided, we try decrypting the
491 // pending keys with it, and if that fails, we cache the passphrase for
492 // re-encryption once the pending keys are decrypted.
493 void SetEncryptionPassphrase(const std::string& passphrase, bool is_explicit);
494
495 // Provides a passphrase for decrypting the user's existing sync data.
496 // Notifies observers of the result of the operation via OnPassphraseAccepted
497 // or OnPassphraseRequired, updates the nigori node, and does re-encryption as
498 // appropriate if there is a previously cached encryption passphrase. It is an
499 // error to call this when we don't have pending keys.
500 void SetDecryptionPassphrase(const std::string& passphrase);
501
502 // Puts the SyncScheduler into a mode where no normal nudge or poll traffic
503 // will occur, but calls to RequestConfig will be supported. If |callback|
504 // is provided, it will be invoked (from the internal SyncScheduler) when
505 // the thread has changed to configuration mode.
506 void StartConfigurationMode(const base::Closure& callback);
507
508 // Switches the mode of operation to CONFIGURATION_MODE and
509 // schedules a config task to fetch updates for |types|.
510 void RequestConfig(const browser_sync::ModelSafeRoutingInfo& routing_info,
511 const syncable::ModelTypeSet& types,
512 sync_api::ConfigureReason reason);
513
514 void RequestCleanupDisabledTypes(
515 const browser_sync::ModelSafeRoutingInfo& routing_info);
516
517 // Request a clearing of all data on the server
518 void RequestClearServerData();
519
520 // Adds a listener to be notified of sync events.
521 // NOTE: It is OK (in fact, it's probably a good idea) to call this before
522 // having received OnInitializationCompleted.
523 void AddObserver(Observer* observer);
524
525 // Remove the given observer. Make sure to call this if the
526 // Observer is being destroyed so the SyncManager doesn't
527 // potentially dereference garbage.
528 void RemoveObserver(Observer* observer);
529
530 // Status-related getter. May be called on any thread.
531 Status GetDetailedStatus() const;
532
533 // Whether or not the Nigori node is encrypted using an explicit passphrase.
534 // May be called on any thread.
535 bool IsUsingExplicitPassphrase();
536
537 // Call periodically from a database-safe thread to persist recent changes
538 // to the syncapi model.
539 void SaveChanges();
540
541 // Initiates shutdown of various components in the sync engine. Must be
542 // called from the main thread to allow preempting ongoing tasks on the sync
543 // loop (that may be blocked on I/O). The semantics of |callback| are the
544 // same as with StartConfigurationMode. If provided and a scheduler / sync
545 // loop exists, it will be invoked from the sync loop by the scheduler to
546 // notify that all work has been flushed + cancelled, and it is idle.
547 // If no scheduler exists, the callback is run immediately (from the loop
548 // this was created on, which is the sync loop), as sync is effectively
549 // stopped.
550 void StopSyncingForShutdown(const base::Closure& callback);
551
552 // Issue a final SaveChanges, and close sqlite handles.
553 void ShutdownOnSyncThread();
554
555 // May be called from any thread.
556 UserShare* GetUserShare() const;
557
558 // Inform the cryptographer of the most recent passphrase and set of
559 // encrypted types (from nigori node), then ensure all data that
560 // needs encryption is encrypted with the appropriate passphrase.
561 //
562 // May trigger OnPassphraseRequired(). Otherwise, it will trigger
563 // OnEncryptedTypesChanged() if necessary (see comments for
564 // OnEncryptedTypesChanged()), and then OnEncryptionComplete().
565 //
566 // Also updates or adds device information to the nigori node.
567 //
568 // Note: opens a transaction, so must only be called after syncapi
569 // has been initialized.
570 void RefreshNigori(const std::string& chrome_version,
571 const base::Closure& done_callback);
572
573 // Enable encryption of all sync data. Once enabled, it can never be
574 // disabled without clearing the server data.
575 //
576 // This will trigger OnEncryptedTypesChanged() if necessary (see
577 // comments for OnEncryptedTypesChanged()). It then may trigger
578 // OnPassphraseRequired(), but otherwise it will trigger
579 // OnEncryptionComplete().
580 void EnableEncryptEverything();
581
582 // Returns true if we are currently encrypting all sync data. May
583 // be called on any thread.
584 bool EncryptEverythingEnabledForTest() const;
585
586 // Gets the set of encrypted types from the cryptographer
587 // Note: opens a transaction. May be called from any thread.
588 syncable::ModelTypeSet GetEncryptedDataTypesForTest() const;
589
590 // Reads the nigori node to determine if any experimental features should
591 // be enabled.
592 // Note: opens a transaction. May be called on any thread.
593 bool ReceivedExperiment(browser_sync::Experiments* experiments) const;
594
595 // Uses a read-only transaction to determine if the directory being synced has
596 // any remaining unsynced items. May be called on any thread.
597 bool HasUnsyncedItems() const;
598
599 // Functions used for testing.
600
601 void TriggerOnNotificationStateChangeForTest(
602 bool notifications_enabled);
603
604 void TriggerOnIncomingNotificationForTest(
605 syncable::ModelTypeSet model_types);
606
607 static const int kDefaultNudgeDelayMilliseconds;
608 static const int kPreferencesNudgeDelayMilliseconds;
609 static const int kPiggybackNudgeDelay;
610
611 static const FilePath::CharType kSyncDatabaseFilename[];
612
613 private:
614 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest);
615
616 // For unit tests.
617 base::TimeDelta GetNudgeDelayTimeDelta(const syncable::ModelType& model_type);
618
619 base::ThreadChecker thread_checker_;
620
621 // An opaque pointer to the nested private class.
622 SyncInternal* data_;
623
624 DISALLOW_COPY_AND_ASSIGN(SyncManager);
625 };
626
627 bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share);
628
629 syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
630 syncable::ModelTypeSet types,
631 sync_api::UserShare* share);
632
633 const char* ConnectionStatusToString(ConnectionStatus status);
634
635 // Returns the string representation of a PassphraseRequiredReason value.
636 const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason);
637
638 } // namespace sync_api
639
640 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698