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

Unified Diff: chrome/browser/chromeos/gdata/gdata_operation_runner.cc

Issue 10836069: Revert 149576 - gdata: Make WeakPtrFactory the last parameter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/chromeos/gdata/gdata_operation_runner.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_operation_runner.cc (revision 149581)
+++ chrome/browser/chromeos/gdata/gdata_operation_runner.cc (working copy)
@@ -17,7 +17,8 @@
: profile_(profile),
auth_service_(new GDataAuthService()),
operation_registry_(new GDataOperationRegistry()),
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
+ weak_ptr_factory_(this),
+ weak_ptr_bound_to_ui_thread_(weak_ptr_factory_.GetWeakPtr()) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
auth_service_->AddObserver(this);
}
@@ -49,7 +50,7 @@
// The re-authenticatation callback will run on UI thread.
operation->SetReAuthenticateCallback(
base::Bind(&GDataOperationRunner::RetryOperation,
- weak_ptr_factory_.GetWeakPtr()));
+ weak_ptr_bound_to_ui_thread_));
StartOperation(operation);
}
@@ -61,7 +62,7 @@
auth_service_->StartAuthentication(
operation_registry_.get(),
base::Bind(&GDataOperationRunner::OnOperationAuthRefresh,
- weak_ptr_factory_.GetWeakPtr(),
+ weak_ptr_bound_to_ui_thread_,
operation));
return;
}
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operation_runner.h ('k') | chrome/browser/chromeos/gdata/gdata_sync_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698