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

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

Issue 10837061: gdata: Make WeakPtrFactory the last parameter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and reorder 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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_auth_service.h ('k') | chrome/browser/chromeos/gdata/gdata_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_auth_service.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_auth_service.cc b/chrome/browser/chromeos/gdata/gdata_auth_service.cc
index 2b335a9fec0594b42b3f0aae33469dbc19bda90b..cb5673aefb60efffddf025b00a9b47f8468b48fa 100644
--- a/chrome/browser/chromeos/gdata/gdata_auth_service.cc
+++ b/chrome/browser/chromeos/gdata/gdata_auth_service.cc
@@ -41,8 +41,7 @@ void GDataAuthService::Initialize(Profile* profile) {
GDataAuthService::GDataAuthService()
: profile_(NULL),
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(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));
}
@@ -63,11 +62,11 @@ void GDataAuthService::StartAuthentication(
BrowserThread::UI,
FROM_HERE,
base::Bind(&GDataAuthService::StartAuthenticationOnUIThread,
- weak_ptr_bound_to_ui_thread_,
+ weak_ptr_factory_.GetWeakPtr(),
registry,
relay_proxy,
base::Bind(&GDataAuthService::OnAuthCompleted,
- weak_ptr_bound_to_ui_thread_,
+ weak_ptr_factory_.GetWeakPtr(),
relay_proxy,
callback)));
} else {
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_auth_service.h ('k') | chrome/browser/chromeos/gdata/gdata_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698