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_DRIVE_DRIVE_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 const FilePath& directory_path, | 131 const FilePath& directory_path, |
132 scoped_ptr<gdata::DocumentEntry> doc_entry, | 132 scoped_ptr<gdata::DocumentEntry> doc_entry, |
133 const FilePath& file_content_path, | 133 const FilePath& file_content_path, |
134 DriveCache::FileOperationType cache_operation, | 134 DriveCache::FileOperationType cache_operation, |
135 const base::Closure& callback) OVERRIDE; | 135 const base::Closure& callback) OVERRIDE; |
136 virtual void UpdateEntryData(const std::string& resource_id, | 136 virtual void UpdateEntryData(const std::string& resource_id, |
137 const std::string& md5, | 137 const std::string& md5, |
138 scoped_ptr<gdata::DocumentEntry> entry, | 138 scoped_ptr<gdata::DocumentEntry> entry, |
139 const FilePath& file_content_path, | 139 const FilePath& file_content_path, |
140 const base::Closure& callback) OVERRIDE; | 140 const base::Closure& callback) OVERRIDE; |
| 141 virtual DriveFileSystemMetadata GetMetadata() const OVERRIDE; |
141 | 142 |
142 // content::NotificationObserver implementation. | 143 // content::NotificationObserver implementation. |
143 virtual void Observe(int type, | 144 virtual void Observe(int type, |
144 const content::NotificationSource& source, | 145 const content::NotificationSource& source, |
145 const content::NotificationDetails& details) OVERRIDE; | 146 const content::NotificationDetails& details) OVERRIDE; |
146 | 147 |
147 // file_system::OperationObserver overrides. | 148 // file_system::OperationObserver overrides. |
148 virtual void OnDirectoryChangedByOperation( | 149 virtual void OnDirectoryChangedByOperation( |
149 const FilePath& directory_path) OVERRIDE; | 150 const FilePath& directory_path) OVERRIDE; |
150 | 151 |
151 // GDataWapiFeedLoader::Observer overrides. | 152 // GDataWapiFeedLoader::Observer overrides. |
152 // Used to propagate events from GDataWapiFeedLoader. | 153 // Used to propagate events from GDataWapiFeedLoader. |
153 virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE; | 154 virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE; |
154 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; | 155 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; |
155 virtual void OnFeedFromServerLoaded() OVERRIDE; | 156 virtual void OnFeedFromServerLoaded() OVERRIDE; |
156 | 157 |
157 DriveResourceMetadata* ResourceMetadata() { return resource_metadata_.get(); } | |
158 | |
159 // Used in tests to load the root feed from the cache. | 158 // Used in tests to load the root feed from the cache. |
160 void LoadRootFeedFromCacheForTesting(); | 159 void LoadRootFeedFromCacheForTesting(); |
161 | 160 |
162 // Used in tests to update the file system from |feed_list|. | 161 // Used in tests to update the file system from |feed_list|. |
163 // See also the comment at GDataWapiFeedLoader::UpdateFromFeed(). | 162 // See also the comment at GDataWapiFeedLoader::UpdateFromFeed(). |
164 DriveFileError UpdateFromFeedForTesting( | 163 DriveFileError UpdateFromFeedForTesting( |
165 const ScopedVector<gdata::DocumentFeed>& feed_list, | 164 const ScopedVector<gdata::DocumentFeed>& feed_list, |
166 int64 start_changestamp, | 165 int64 start_changestamp, |
167 int64 root_feed_changestamp); | 166 int64 root_feed_changestamp); |
168 | 167 |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 // invalidate the weak pointers before any other members are destroyed. | 885 // invalidate the weak pointers before any other members are destroyed. |
887 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_; | 886 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_; |
888 // Unlike other classes, we need this as we need this to redirect a task | 887 // Unlike other classes, we need this as we need this to redirect a task |
889 // from IO thread to UI thread. | 888 // from IO thread to UI thread. |
890 base::WeakPtr<DriveFileSystem> ui_weak_ptr_; | 889 base::WeakPtr<DriveFileSystem> ui_weak_ptr_; |
891 }; | 890 }; |
892 | 891 |
893 } // namespace drive | 892 } // namespace drive |
894 | 893 |
895 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 894 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
OLD | NEW |