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

Unified Diff: chrome/browser/chromeos/gdata/gdata_cache.h

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.cc ('k') | chrome/browser/chromeos/gdata/gdata_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_cache.h
diff --git a/chrome/browser/chromeos/gdata/gdata_cache.h b/chrome/browser/chromeos/gdata/gdata_cache.h
index 3ee73880bcae469a74aba8cf0c452177cc565697..125d2ac986057a61d9d6da37a81e8ebebc0caa2b 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache.h
+++ b/chrome/browser/chromeos/gdata/gdata_cache.h
@@ -430,13 +430,12 @@ class GDataCache {
// The cache state data. This member must be access only on the blocking pool.
scoped_ptr<GDataCacheMetadata> metadata_;
- // WeakPtrFactory and WeakPtr bound to the UI thread.
- base::WeakPtrFactory<GDataCache> ui_weak_ptr_factory_;
- base::WeakPtr<GDataCache> ui_weak_ptr_;
-
// List of observers, this member must be accessed on UI thread.
ObserverList<Observer> observers_;
+ // Note: This should remain the last member so it'll be destroyed and
+ // invalidate its weak pointers before any other members are destroyed.
+ base::WeakPtrFactory<GDataCache> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(GDataCache);
};
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_auth_service.cc ('k') | chrome/browser/chromeos/gdata/gdata_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698