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

Unified Diff: components/sync/driver/glue/sync_backend_host.h

Issue 2471183003: Do not observe MessageLoop destruction from ModelSafeWorker. (Closed)
Patch Set: CR maxbogue #23 Created 4 years, 1 month 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: components/sync/driver/glue/sync_backend_host.h
diff --git a/components/sync/driver/glue/sync_backend_host.h b/components/sync/driver/glue/sync_backend_host.h
index e20f318d1f332dc631a841f5193568682baa5c3d..a56e805201f27424292eb870f84123439ee00ae5 100644
--- a/components/sync/driver/glue/sync_backend_host.h
+++ b/components/sync/driver/glue/sync_backend_host.h
@@ -117,14 +117,8 @@ class SyncBackendHost : public BackendDataTypeConfigurer {
// Called on |frontend_loop_| to kick off shutdown.
// See the implementation and Core::DoShutdown for details.
// Must be called *after* StopSyncingForShutdown.
- // For any reason other than BROWSER_SHUTDOWN, caller should claim sync
- // thread because:
- // * during browser shutdown sync thread is not claimed to avoid blocking
- // browser shutdown on sync shutdown.
- // * otherwise sync thread is claimed so that if sync backend is recreated
- // later, initialization of new backend is serialized on previous sync
- // thread after cleanup of previous backend to avoid old/new backends
- // interfere with each other.
+ // Transfers ownership of the sync thread to the caller which may reuse it
+ // with a different SyncBackendHost or join it immediately.
virtual std::unique_ptr<base::Thread> Shutdown(ShutdownReason reason) = 0;
// Removes all current registrations from the backend on the

Powered by Google App Engine
This is Rietveld 408576698