| Index: sync/internal_api/public/sync_manager.h
|
| diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
|
| index 3f5316b7fd261afad1f61e6165e3e44298d95245..735e5ed4387854bb2c86922e1c26f2c822fe9b0d 100644
|
| --- a/sync/internal_api/public/sync_manager.h
|
| +++ b/sync/internal_api/public/sync_manager.h
|
| @@ -45,6 +45,7 @@ class JsEventHandler;
|
| class SyncEncryptionHandler;
|
| class SyncScheduler;
|
| struct UserShare;
|
| +class CancelationSignal;
|
|
|
| namespace sessions {
|
| class SyncSessionSnapshot;
|
| @@ -299,6 +300,9 @@ class SYNC_EXPORT SyncManager : public syncer::InvalidationHandler {
|
| // |keystore_encryption_enabled| determines whether we enable the keystore
|
| // encryption functionality in the cryptographer/nigori.
|
| // |report_unrecoverable_error_function| may be NULL.
|
| + // |cancelation_signal| carries shutdown requests across threads. This one
|
| + // will be used to cut short any network I/O and tell the syncer to exit
|
| + // early.
|
| //
|
| // TODO(akalin): Replace the |post_factory| parameter with a
|
| // URLFetcher parameter.
|
| @@ -320,7 +324,8 @@ class SYNC_EXPORT SyncManager : public syncer::InvalidationHandler {
|
| Encryptor* encryptor,
|
| scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler,
|
| ReportUnrecoverableErrorFunction report_unrecoverable_error_function,
|
| - bool use_oauth2_token) = 0;
|
| + bool use_oauth2_token,
|
| + CancelationSignal* cancelation_signal) = 0;
|
|
|
| // Throw an unrecoverable error from a transaction (mostly used for
|
| // testing).
|
| @@ -392,17 +397,6 @@ class SYNC_EXPORT SyncManager : public syncer::InvalidationHandler {
|
| // to the syncapi model.
|
| virtual void SaveChanges() = 0;
|
|
|
| - // Initiates shutdown of various components in the sync engine. Must be
|
| - // called from the main thread to allow preempting ongoing tasks on the sync
|
| - // loop (that may be blocked on I/O). The semantics of |callback| are the
|
| - // same as with StartConfigurationMode. If provided and a scheduler / sync
|
| - // loop exists, it will be invoked from the sync loop by the scheduler to
|
| - // notify that all work has been flushed + cancelled, and it is idle.
|
| - // If no scheduler exists, the callback is run immediately (from the loop
|
| - // this was created on, which is the sync loop), as sync is effectively
|
| - // stopped.
|
| - virtual void StopSyncingForShutdown() = 0;
|
| -
|
| // Issue a final SaveChanges, and close sqlite handles.
|
| virtual void ShutdownOnSyncThread() = 0;
|
|
|
|
|