Index: chrome/browser/sync/glue/sync_backend_host_impl.cc |
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.cc b/chrome/browser/sync/glue/sync_backend_host_impl.cc |
index 4c202f0d8e9038f1cd51ea47467dea622e9c1296..09cfd1ea0202aecafa48b644485e1fe454dada2f 100644 |
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc |
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc |
@@ -234,6 +234,9 @@ void SyncBackendHostImpl::StopSyncingForShutdown() { |
// Stop listening for and forwarding locally-triggered sync refresh requests. |
notification_registrar_.RemoveAll(); |
+ // Stop non-blocking sync types from sending any more requests to the syncer. |
+ sync_core_proxy_.reset(); |
+ |
DCHECK(registrar_->sync_thread()->IsRunning()); |
registrar_->RequestWorkerStopOnUIThread(); |
@@ -427,6 +430,10 @@ syncer::UserShare* SyncBackendHostImpl::GetUserShare() const { |
return core_->sync_manager()->GetUserShare(); |
} |
+syncer::SyncCoreProxy SyncBackendHostImpl::GetSyncCoreProxy() { |
+ return *sync_core_proxy_.get(); |
+} |
+ |
SyncBackendHostImpl::Status SyncBackendHostImpl::GetDetailedStatus() { |
DCHECK(initialized()); |
return core_->sync_manager()->GetDetailedStatus(); |
@@ -573,13 +580,16 @@ void SyncBackendHostImpl::HandleControlTypesDownloadRetry() { |
void SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop( |
const syncer::WeakHandle<syncer::JsBackend> js_backend, |
const syncer::WeakHandle<syncer::DataTypeDebugInfoListener> |
- debug_info_listener) { |
+ debug_info_listener, |
+ syncer::SyncCoreProxy sync_core_proxy) { |
DCHECK_EQ(base::MessageLoop::current(), frontend_loop_); |
if (!frontend_) |
return; |
initialized_ = true; |
+ sync_core_proxy_.reset(new syncer::SyncCoreProxy(sync_core_proxy)); |
+ |
invalidator_->RegisterInvalidationHandler(this); |
invalidation_handler_registered_ = true; |