Chromium Code Reviews| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 const FilePath& directory_path, | 128 const FilePath& directory_path, |
| 129 scoped_ptr<gdata::DocumentEntry> doc_entry, | 129 scoped_ptr<gdata::DocumentEntry> doc_entry, |
| 130 const FilePath& file_content_path, | 130 const FilePath& file_content_path, |
| 131 DriveCache::FileOperationType cache_operation, | 131 DriveCache::FileOperationType cache_operation, |
| 132 const base::Closure& callback) OVERRIDE; | 132 const base::Closure& callback) OVERRIDE; |
| 133 virtual void UpdateEntryData(const std::string& resource_id, | 133 virtual void UpdateEntryData(const std::string& resource_id, |
| 134 const std::string& md5, | 134 const std::string& md5, |
| 135 scoped_ptr<gdata::DocumentEntry> entry, | 135 scoped_ptr<gdata::DocumentEntry> entry, |
| 136 const FilePath& file_content_path, | 136 const FilePath& file_content_path, |
| 137 const base::Closure& callback) OVERRIDE; | 137 const base::Closure& callback) OVERRIDE; |
| 138 virtual DriveResourceMetadata* GetResourceMetadata() OVERRIDE { | |
|
Haruki Sato
2012/10/15 07:10:29
Is this overriding something?
satorux1
2012/10/16 05:02:56
yes. one in DriveFileSystemInterface
| |
| 139 return resource_metadata_.get(); | |
| 140 } | |
| 138 | 141 |
| 139 // content::NotificationObserver implementation. | 142 // content::NotificationObserver implementation. |
| 140 virtual void Observe(int type, | 143 virtual void Observe(int type, |
| 141 const content::NotificationSource& source, | 144 const content::NotificationSource& source, |
| 142 const content::NotificationDetails& details) OVERRIDE; | 145 const content::NotificationDetails& details) OVERRIDE; |
| 143 | 146 |
| 144 // GDataWapiFeedLoader::Observer overrides. | 147 // GDataWapiFeedLoader::Observer overrides. |
| 145 // Used to propagate events from GDataWapiFeedLoader. | 148 // Used to propagate events from GDataWapiFeedLoader. |
| 146 virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE; | 149 virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE; |
| 147 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; | 150 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; |
| 148 virtual void OnFeedFromServerLoaded() OVERRIDE; | 151 virtual void OnFeedFromServerLoaded() OVERRIDE; |
| 149 | 152 |
| 150 DriveResourceMetadata* ResourceMetadata() { return resource_metadata_.get(); } | |
| 151 | |
| 152 // Used in tests to load the root feed from the cache. | 153 // Used in tests to load the root feed from the cache. |
| 153 void LoadRootFeedFromCacheForTesting(); | 154 void LoadRootFeedFromCacheForTesting(); |
| 154 | 155 |
| 155 // Used in tests to update the file system from |feed_list|. | 156 // Used in tests to update the file system from |feed_list|. |
| 156 // See also the comment at GDataWapiFeedLoader::UpdateFromFeed(). | 157 // See also the comment at GDataWapiFeedLoader::UpdateFromFeed(). |
| 157 DriveFileError UpdateFromFeedForTesting( | 158 DriveFileError UpdateFromFeedForTesting( |
| 158 const ScopedVector<gdata::DocumentFeed>& feed_list, | 159 const ScopedVector<gdata::DocumentFeed>& feed_list, |
| 159 int64 start_changestamp, | 160 int64 start_changestamp, |
| 160 int64 root_feed_changestamp); | 161 int64 root_feed_changestamp); |
| 161 | 162 |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 880 // invalidate the weak pointers before any other members are destroyed. | 881 // invalidate the weak pointers before any other members are destroyed. |
| 881 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_; | 882 base::WeakPtrFactory<DriveFileSystem> ui_weak_ptr_factory_; |
| 882 // Unlike other classes, we need this as we need this to redirect a task | 883 // Unlike other classes, we need this as we need this to redirect a task |
| 883 // from IO thread to UI thread. | 884 // from IO thread to UI thread. |
| 884 base::WeakPtr<DriveFileSystem> ui_weak_ptr_; | 885 base::WeakPtr<DriveFileSystem> ui_weak_ptr_; |
| 885 }; | 886 }; |
| 886 | 887 |
| 887 } // namespace drive | 888 } // namespace drive |
| 888 | 889 |
| 889 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ | 890 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_H_ |
| OLD | NEW |