Index: trunk/src/sync/internal_api/public/sync_manager.h |
=================================================================== |
--- trunk/src/sync/internal_api/public/sync_manager.h (revision 222204) |
+++ trunk/src/sync/internal_api/public/sync_manager.h (working copy) |
@@ -45,7 +45,6 @@ |
class SyncEncryptionHandler; |
class SyncScheduler; |
struct UserShare; |
-class CancelationSignal; |
namespace sessions { |
class SyncSessionSnapshot; |
@@ -321,8 +320,7 @@ |
Encryptor* encryptor, |
scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler, |
ReportUnrecoverableErrorFunction report_unrecoverable_error_function, |
- bool use_oauth2_token, |
- CancelationSignal* cancelation_signal) = 0; |
+ bool use_oauth2_token) = 0; |
// Throw an unrecoverable error from a transaction (mostly used for |
// testing). |
@@ -394,6 +392,17 @@ |
// 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; |