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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_core.cc

Issue 437683002: Wire sync shutdown reason from PSS all the way down to sync manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: chrome/browser/sync/glue/sync_backend_host_core.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_core.cc b/chrome/browser/sync/glue/sync_backend_host_core.cc
index 98e1a4e93f73aa7af5ff245b105db47d28f4f3ee..58c59c3208524ea2379ba9b0958ef843ff1fdbca 100644
--- a/chrome/browser/sync/glue/sync_backend_host_core.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_core.cc
@@ -151,7 +151,7 @@ void SyncBackendHostCore::OnInitializationComplete(
DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
if (!success) {
- DoDestroySyncManager();
+ DoDestroySyncManager(syncer::STOP_SYNC);
host_.Call(FROM_HERE,
&SyncBackendHostImpl::HandleInitializationFailureOnFrontendLoop);
return;
@@ -566,31 +566,31 @@ void SyncBackendHostCore::ShutdownOnUIThread() {
release_request_context_signal_.Signal();
}
-void SyncBackendHostCore::DoShutdown(bool sync_disabled) {
+void SyncBackendHostCore::DoShutdown(syncer::ShutdownReason reason) {
DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
// It's safe to do this even if the type was never activated.
registrar_->DeactivateDataType(syncer::DEVICE_INFO);
synced_device_tracker_.reset();
- DoDestroySyncManager();
+ DoDestroySyncManager(reason);
registrar_ = NULL;
- if (sync_disabled)
+ if (reason == syncer::DISABLE_SYNC)
DeleteSyncDataFolder();
host_.Reset();
weak_ptr_factory_.InvalidateWeakPtrs();
}
-void SyncBackendHostCore::DoDestroySyncManager() {
+void SyncBackendHostCore::DoDestroySyncManager(syncer::ShutdownReason reason) {
DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
if (sync_manager_) {
DisableDirectoryTypeDebugInfoForwarding();
save_changes_timer_.reset();
sync_manager_->RemoveObserver(this);
- sync_manager_->ShutdownOnSyncThread();
+ sync_manager_->ShutdownOnSyncThread(reason);
sync_manager_.reset();
}
}
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_core.h ('k') | chrome/browser/sync/glue/sync_backend_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698