From 7b4c6bea2e8ecdba98f90c6188ebf1ffc1b5d750 Mon Sep 17 00:00:00 2001 From: "lipalani@chromium.org" Date: Tue, 8 May 2012 05:13:02 +0000 Subject: Speculative fix for sync not exiting issue. BUG=120709 TEST= Review URL: https://chromiumcodereview.appspot.com/10384020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135794 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/sync/glue/non_frontend_data_type_controller.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc index c8f8455..8484f0d 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc @@ -80,6 +80,8 @@ void NonFrontendDataTypeController::StopWhileAssociating() { abort_association_ = true; if (model_associator_.get()) model_associator_->AbortAssociation(); + if (!start_association_called_.IsSignaled()) + return; // There is nothing more for us to do. } // Wait for the model association to abort. @@ -410,7 +412,6 @@ void NonFrontendDataTypeController::set_change_processor( void NonFrontendDataTypeController::StartAssociation() { DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI)); - start_association_called_.Signal(); DCHECK_EQ(state_, ASSOCIATING); { base::AutoLock lock(abort_association_lock_); @@ -418,6 +419,7 @@ void NonFrontendDataTypeController::StartAssociation() { abort_association_complete_.Signal(); return; } + start_association_called_.Signal(); CreateSyncComponents(); } -- cgit v1.1