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

Unified Diff: sync/internal_api/public/sync_manager.h

Issue 23189021: sync: Gracefully handle very early shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retry: sync non-blocking early shutdown Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
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..3a9c7a61ca33ff1ec6d24badfa81fc60c8e284a1 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;
@@ -320,7 +321,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 +394,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;
« no previous file with comments | « sync/internal_api/public/internal_components_factory_impl.h ('k') | sync/internal_api/public/test/fake_sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698