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

Unified Diff: chrome/browser/chromeos/gdata/gdata_cache.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_cache.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_cache.cc (revision 149581)
+++ chrome/browser/chromeos/gdata/gdata_cache.cc (working copy)
@@ -324,7 +324,8 @@
: cache_root_path_(cache_root_path),
cache_paths_(GetCachePaths(cache_root_path_)),
blocking_task_runner_(blocking_task_runner),
- weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
+ ui_weak_ptr_factory_(this),
+ ui_weak_ptr_(ui_weak_ptr_factory_.GetWeakPtr()) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
@@ -541,7 +542,7 @@
GDataCache::FILE_OPERATION_MOVE,
error),
base::Bind(&GDataCache::OnPinned,
- weak_ptr_factory_.GetWeakPtr(),
+ ui_weak_ptr_,
base::Owned(error),
resource_id,
md5,
@@ -563,7 +564,7 @@
GDataCache::FILE_OPERATION_MOVE,
error),
base::Bind(&GDataCache::OnUnpinned,
- weak_ptr_factory_.GetWeakPtr(),
+ ui_weak_ptr_,
base::Owned(error),
resource_id,
md5,
@@ -633,7 +634,7 @@
GDataCache::FILE_OPERATION_MOVE,
error),
base::Bind(&GDataCache::OnCommitDirty,
- weak_ptr_factory_.GetWeakPtr(),
+ ui_weak_ptr_,
base::Owned(error),
resource_id,
md5,
@@ -718,7 +719,7 @@
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Invalidate the weak pointer.
- weak_ptr_factory_.InvalidateWeakPtrs();
+ ui_weak_ptr_factory_.InvalidateWeakPtrs();
// Destroy myself on the blocking pool.
blocking_task_runner_->PostTask(
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_cache.h ('k') | chrome/browser/chromeos/gdata/gdata_download_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698