| 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_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 class DriveServiceInterface; | 34 class DriveServiceInterface; |
| 35 class FileCacheEntry; | 35 class FileCacheEntry; |
| 36 class FileSystemObserver; | 36 class FileSystemObserver; |
| 37 class JobScheduler; | 37 class JobScheduler; |
| 38 | 38 |
| 39 namespace internal { | 39 namespace internal { |
| 40 class ChangeListLoader; | 40 class ChangeListLoader; |
| 41 class ResourceMetadata; | 41 class ResourceMetadata; |
| 42 class SyncClient; | 42 class SyncClient; |
| 43 class FileWriteWatcher; |
| 43 } // namespace internal | 44 } // namespace internal |
| 44 | 45 |
| 45 namespace file_system { | 46 namespace file_system { |
| 46 class CopyOperation; | 47 class CopyOperation; |
| 47 class CreateDirectoryOperation; | 48 class CreateDirectoryOperation; |
| 48 class CreateFileOperation; | 49 class CreateFileOperation; |
| 49 class DownloadOperation; | 50 class DownloadOperation; |
| 51 class GetFileForSavingOperation; |
| 50 class MoveOperation; | 52 class MoveOperation; |
| 51 class OpenFileOperation; | 53 class OpenFileOperation; |
| 52 class OperationObserver; | 54 class OperationObserver; |
| 53 class RemoveOperation; | 55 class RemoveOperation; |
| 54 class SearchOperation; | 56 class SearchOperation; |
| 55 class TouchOperation; | 57 class TouchOperation; |
| 56 class TruncateOperation; | 58 class TruncateOperation; |
| 57 class UpdateOperation; | 59 class UpdateOperation; |
| 58 } // namespace file_system | 60 } // namespace file_system |
| 59 | 61 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 const FileOperationCallback& callback) OVERRIDE; | 118 const FileOperationCallback& callback) OVERRIDE; |
| 117 virtual void TruncateFile(const base::FilePath& file_path, | 119 virtual void TruncateFile(const base::FilePath& file_path, |
| 118 int64 length, | 120 int64 length, |
| 119 const FileOperationCallback& callback) OVERRIDE; | 121 const FileOperationCallback& callback) OVERRIDE; |
| 120 virtual void Pin(const base::FilePath& file_path, | 122 virtual void Pin(const base::FilePath& file_path, |
| 121 const FileOperationCallback& callback) OVERRIDE; | 123 const FileOperationCallback& callback) OVERRIDE; |
| 122 virtual void Unpin(const base::FilePath& file_path, | 124 virtual void Unpin(const base::FilePath& file_path, |
| 123 const FileOperationCallback& callback) OVERRIDE; | 125 const FileOperationCallback& callback) OVERRIDE; |
| 124 virtual void GetFileByPath(const base::FilePath& file_path, | 126 virtual void GetFileByPath(const base::FilePath& file_path, |
| 125 const GetFileCallback& callback) OVERRIDE; | 127 const GetFileCallback& callback) OVERRIDE; |
| 128 virtual void GetFileByPathForSaving(const base::FilePath& file_path, |
| 129 const GetFileCallback& callback) OVERRIDE; |
| 126 virtual void GetFileContentByPath( | 130 virtual void GetFileContentByPath( |
| 127 const base::FilePath& file_path, | 131 const base::FilePath& file_path, |
| 128 const GetFileContentInitializedCallback& initialized_callback, | 132 const GetFileContentInitializedCallback& initialized_callback, |
| 129 const google_apis::GetContentCallback& get_content_callback, | 133 const google_apis::GetContentCallback& get_content_callback, |
| 130 const FileOperationCallback& completion_callback) OVERRIDE; | 134 const FileOperationCallback& completion_callback) OVERRIDE; |
| 131 virtual void GetResourceEntryByPath( | 135 virtual void GetResourceEntryByPath( |
| 132 const base::FilePath& file_path, | 136 const base::FilePath& file_path, |
| 133 const GetResourceEntryCallback& callback) OVERRIDE; | 137 const GetResourceEntryCallback& callback) OVERRIDE; |
| 134 virtual void ReadDirectoryByPath( | 138 virtual void ReadDirectoryByPath( |
| 135 const base::FilePath& directory_path, | 139 const base::FilePath& directory_path, |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 297 |
| 294 // Error of the last update check. | 298 // Error of the last update check. |
| 295 FileError last_update_check_error_; | 299 FileError last_update_check_error_; |
| 296 | 300 |
| 297 // True if hosted documents should be hidden. | 301 // True if hosted documents should be hidden. |
| 298 bool hide_hosted_docs_; | 302 bool hide_hosted_docs_; |
| 299 | 303 |
| 300 scoped_ptr<PrefChangeRegistrar> pref_registrar_; | 304 scoped_ptr<PrefChangeRegistrar> pref_registrar_; |
| 301 | 305 |
| 302 scoped_ptr<internal::SyncClient> sync_client_; | 306 scoped_ptr<internal::SyncClient> sync_client_; |
| 307 scoped_ptr<internal::FileWriteWatcher> file_write_watcher_; |
| 303 | 308 |
| 304 // The loader is used to load the change lists. | 309 // The loader is used to load the change lists. |
| 305 scoped_ptr<internal::ChangeListLoader> change_list_loader_; | 310 scoped_ptr<internal::ChangeListLoader> change_list_loader_; |
| 306 | 311 |
| 307 ObserverList<FileSystemObserver> observers_; | 312 ObserverList<FileSystemObserver> observers_; |
| 308 | 313 |
| 309 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 314 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 310 | 315 |
| 311 base::FilePath temporary_file_directory_; | 316 base::FilePath temporary_file_directory_; |
| 312 | 317 |
| 313 // Implementation of each file system operation. | 318 // Implementation of each file system operation. |
| 314 scoped_ptr<file_system::CopyOperation> copy_operation_; | 319 scoped_ptr<file_system::CopyOperation> copy_operation_; |
| 315 scoped_ptr<file_system::CreateDirectoryOperation> create_directory_operation_; | 320 scoped_ptr<file_system::CreateDirectoryOperation> create_directory_operation_; |
| 316 scoped_ptr<file_system::CreateFileOperation> create_file_operation_; | 321 scoped_ptr<file_system::CreateFileOperation> create_file_operation_; |
| 317 scoped_ptr<file_system::MoveOperation> move_operation_; | 322 scoped_ptr<file_system::MoveOperation> move_operation_; |
| 318 scoped_ptr<file_system::OpenFileOperation> open_file_operation_; | 323 scoped_ptr<file_system::OpenFileOperation> open_file_operation_; |
| 319 scoped_ptr<file_system::RemoveOperation> remove_operation_; | 324 scoped_ptr<file_system::RemoveOperation> remove_operation_; |
| 320 scoped_ptr<file_system::TouchOperation> touch_operation_; | 325 scoped_ptr<file_system::TouchOperation> touch_operation_; |
| 321 scoped_ptr<file_system::TruncateOperation> truncate_operation_; | 326 scoped_ptr<file_system::TruncateOperation> truncate_operation_; |
| 322 scoped_ptr<file_system::DownloadOperation> download_operation_; | 327 scoped_ptr<file_system::DownloadOperation> download_operation_; |
| 323 scoped_ptr<file_system::UpdateOperation> update_operation_; | 328 scoped_ptr<file_system::UpdateOperation> update_operation_; |
| 324 scoped_ptr<file_system::SearchOperation> search_operation_; | 329 scoped_ptr<file_system::SearchOperation> search_operation_; |
| 330 scoped_ptr<file_system::GetFileForSavingOperation> |
| 331 get_file_for_saving_operation_; |
| 325 | 332 |
| 326 // Note: This should remain the last member so it'll be destroyed and | 333 // Note: This should remain the last member so it'll be destroyed and |
| 327 // invalidate the weak pointers before any other members are destroyed. | 334 // invalidate the weak pointers before any other members are destroyed. |
| 328 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; | 335 base::WeakPtrFactory<FileSystem> weak_ptr_factory_; |
| 329 | 336 |
| 330 DISALLOW_COPY_AND_ASSIGN(FileSystem); | 337 DISALLOW_COPY_AND_ASSIGN(FileSystem); |
| 331 }; | 338 }; |
| 332 | 339 |
| 333 } // namespace drive | 340 } // namespace drive |
| 334 | 341 |
| 335 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ | 342 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_H_ |
| OLD | NEW |