Index: chrome/browser/chromeos/gdata/gdata_operation_runner.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_operation_runner.cc b/chrome/browser/chromeos/gdata/gdata_operation_runner.cc |
index 0705c387e11cdd2c953e9b6c4f6db76437057fe0..2bd8151f4a03ffa900b8aea3824e46f69eeaedb7 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_operation_runner.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_operation_runner.cc |
@@ -17,8 +17,7 @@ GDataOperationRunner::GDataOperationRunner(Profile* profile) |
: profile_(profile), |
auth_service_(new GDataAuthService()), |
operation_registry_(new GDataOperationRegistry()), |
- weak_ptr_factory_(this), |
- weak_ptr_bound_to_ui_thread_(weak_ptr_factory_.GetWeakPtr()) { |
+ weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
auth_service_->AddObserver(this); |
} |
@@ -50,7 +49,7 @@ void GDataOperationRunner::StartOperationWithRetry( |
// The re-authenticatation callback will run on UI thread. |
operation->SetReAuthenticateCallback( |
base::Bind(&GDataOperationRunner::RetryOperation, |
- weak_ptr_bound_to_ui_thread_)); |
+ weak_ptr_factory_.GetWeakPtr())); |
StartOperation(operation); |
} |
@@ -62,7 +61,7 @@ void GDataOperationRunner::StartOperation(GDataOperationInterface* operation) { |
auth_service_->StartAuthentication( |
operation_registry_.get(), |
base::Bind(&GDataOperationRunner::OnOperationAuthRefresh, |
- weak_ptr_bound_to_ui_thread_, |
+ weak_ptr_factory_.GetWeakPtr(), |
operation)); |
return; |
} |