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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.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
Index: chrome/browser/chromeos/gdata/gdata_file_system.h
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h
index caca8b58af795a6140c2c5e7cba9409b6d4e6afe..726fefaed45dfa3f2be01616e3570ac4002affb2 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h
@@ -874,13 +874,13 @@ class GDataFileSystem : public GDataFileSystemInterface,
scoped_ptr<PrefChangeRegistrar> pref_registrar_;
- // WeakPtrFactory and WeakPtr bound to the UI thread.
- base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_;
- base::WeakPtr<GDataFileSystem> ui_weak_ptr_;
-
ObserverList<Observer> observers_;
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
+
+ // 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<GDataFileSystem> weak_ptr_factory_;
};
} // namespace gdata
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_download_observer.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698