| 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 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 class SequencedTaskRunner; | 29 class SequencedTaskRunner; |
| 30 | 30 |
| 31 } // namespace base | 31 } // namespace base |
| 32 | 32 |
| 33 namespace gdata { | 33 namespace gdata { |
| 34 | 34 |
| 35 class DocumentsServiceInterface; | 35 class DocumentsServiceInterface; |
| 36 class DriveWebAppsRegistryInterface; | 36 class DriveWebAppsRegistryInterface; |
| 37 class GDataWapiFeedLoader; | 37 class GDataWapiFeedLoader; |
| 38 class StaleCacheFilesRemover; |
| 38 struct UploadFileInfo; | 39 struct UploadFileInfo; |
| 39 | 40 |
| 40 // The production implementation of GDataFileSystemInterface. | 41 // The production implementation of GDataFileSystemInterface. |
| 41 class GDataFileSystem : public GDataFileSystemInterface, | 42 class GDataFileSystem : public GDataFileSystemInterface, |
| 42 public GDataWapiFeedLoader::Observer, | 43 public GDataWapiFeedLoader::Observer, |
| 43 public content::NotificationObserver { | 44 public content::NotificationObserver { |
| 44 public: | 45 public: |
| 45 GDataFileSystem(Profile* profile, | 46 GDataFileSystem(Profile* profile, |
| 46 GDataCache* cache, | 47 GDataCache* cache, |
| 47 DocumentsServiceInterface* documents_service, | 48 DocumentsServiceInterface* documents_service, |
| (...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 bool hide_hosted_docs_; | 851 bool hide_hosted_docs_; |
| 851 | 852 |
| 852 // The set of paths opened by OpenFile but not yet closed by CloseFile. | 853 // The set of paths opened by OpenFile but not yet closed by CloseFile. |
| 853 std::set<FilePath> open_files_; | 854 std::set<FilePath> open_files_; |
| 854 | 855 |
| 855 scoped_ptr<PrefChangeRegistrar> pref_registrar_; | 856 scoped_ptr<PrefChangeRegistrar> pref_registrar_; |
| 856 | 857 |
| 857 // The loader is used to load the feeds. | 858 // The loader is used to load the feeds. |
| 858 scoped_ptr<GDataWapiFeedLoader> feed_loader_; | 859 scoped_ptr<GDataWapiFeedLoader> feed_loader_; |
| 859 | 860 |
| 861 // The remover is used to remove stale cache files. |
| 862 scoped_ptr<StaleCacheFilesRemover> stale_cache_files_remover_; |
| 863 |
| 860 ObserverList<GDataFileSystemInterface::Observer> observers_; | 864 ObserverList<GDataFileSystemInterface::Observer> observers_; |
| 861 | 865 |
| 862 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 866 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 863 | 867 |
| 864 // WeakPtrFactory and WeakPtr bound to the UI thread. | 868 // WeakPtrFactory and WeakPtr bound to the UI thread. |
| 865 // Note: These should remain the last member so they'll be destroyed and | 869 // Note: These should remain the last member so they'll be destroyed and |
| 866 // invalidate the weak pointers before any other members are destroyed. | 870 // invalidate the weak pointers before any other members are destroyed. |
| 867 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 871 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
| 868 // Unlike other classes, we need this as we need this to redirect a task | 872 // Unlike other classes, we need this as we need this to redirect a task |
| 869 // from IO thread to UI thread. | 873 // from IO thread to UI thread. |
| 870 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 874 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 871 }; | 875 }; |
| 872 | 876 |
| 873 } // namespace gdata | 877 } // namespace gdata |
| 874 | 878 |
| 875 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 879 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |