OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 base::Timer update_timer_; | 867 base::Timer update_timer_; |
868 | 868 |
869 // True if hosted documents should be hidden. | 869 // True if hosted documents should be hidden. |
870 bool hide_hosted_docs_; | 870 bool hide_hosted_docs_; |
871 | 871 |
872 // The set of paths opened by OpenFile but not yet closed by CloseFile. | 872 // The set of paths opened by OpenFile but not yet closed by CloseFile. |
873 std::set<FilePath> open_files_; | 873 std::set<FilePath> open_files_; |
874 | 874 |
875 scoped_ptr<PrefChangeRegistrar> pref_registrar_; | 875 scoped_ptr<PrefChangeRegistrar> pref_registrar_; |
876 | 876 |
877 // WeakPtrFactory and WeakPtr bound to the UI thread. | |
878 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | |
879 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | |
880 | |
881 ObserverList<Observer> observers_; | 877 ObserverList<Observer> observers_; |
882 | 878 |
883 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 879 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 880 |
| 881 // Note: This should remain the last member so it'll be destroyed and |
| 882 // invalidate its weak pointers before any other members are destroyed. |
| 883 base::WeakPtrFactory<GDataFileSystem> weak_ptr_factory_; |
884 }; | 884 }; |
885 | 885 |
886 } // namespace gdata | 886 } // namespace gdata |
887 | 887 |
888 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 888 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |