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

Unified Diff: trunk/src/chrome/browser/sync/glue/sync_backend_host.h

Issue 23658030: Revert 222154 "sync: Gracefully handle very early shutdown" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
« no previous file with comments | « no previous file | trunk/src/chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/browser/sync/glue/sync_backend_host.h
===================================================================
--- trunk/src/chrome/browser/sync/glue/sync_backend_host.h (revision 222204)
+++ trunk/src/chrome/browser/sync/glue/sync_backend_host.h (working copy)
@@ -20,7 +20,6 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "google_apis/gaia/google_service_auth_error.h"
-#include "sync/internal_api/public/base/cancelation_signal.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/configure_reason.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
@@ -219,9 +218,10 @@
bool SetDecryptionPassphrase(const std::string& passphrase)
WARN_UNUSED_RESULT;
- // Called on |frontend_loop_| to kick off shutdown procedure. Attempts to cut
- // short any long-lived or blocking sync thread tasks so that the shutdown on
- // sync thread task that we're about to post won't have to wait very long.
+ // Called on |frontend_loop_| to kick off shutdown procedure. After this, no
+ // further sync activity will occur with the sync server and no further
+ // change applications will occur from changes already downloaded.
+ // Furthermore, no notifications will be sent to any invalidation handler.
virtual void StopSyncingForShutdown();
// Called on |frontend_loop_| to kick off shutdown.
@@ -339,8 +339,7 @@
unrecoverable_error_handler,
syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function,
- bool use_oauth2_token,
- syncer::CancelationSignal* cancelation_signal);
+ bool use_oauth2_token);
~DoInitializeOptions();
base::MessageLoop* sync_loop;
@@ -364,7 +363,6 @@
syncer::ReportUnrecoverableErrorFunction
report_unrecoverable_error_function;
bool use_oauth2_token;
- syncer::CancelationSignal* const cancelation_signal;
};
// Allows tests to perform alternate core initialization work.
@@ -525,6 +523,10 @@
virtual void OnIncomingInvalidation(
const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE;
+ // Handles stopping the core's SyncManager, accounting for whether
+ // initialization is done yet.
+ void StopSyncManagerForShutdown();
+
base::WeakPtrFactory<SyncBackendHost> weak_ptr_factory_;
content::NotificationRegistrar notification_registrar_;
@@ -587,8 +589,6 @@
invalidation::InvalidationService* invalidator_;
bool invalidation_handler_registered_;
- syncer::CancelationSignal cancelation_signal_;
-
DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
};
« no previous file with comments | « no previous file | trunk/src/chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698