| 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_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // Used to get filesystem metadata. | 118 // Used to get filesystem metadata. |
| 119 typedef base::Callback<void(const FileSystemMetadata&)> | 119 typedef base::Callback<void(const FileSystemMetadata&)> |
| 120 GetFilesystemMetadataCallback; | 120 GetFilesystemMetadataCallback; |
| 121 | 121 |
| 122 // Used to mark cached files mounted. | 122 // Used to mark cached files mounted. |
| 123 typedef base::Callback<void(FileError error, | 123 typedef base::Callback<void(FileError error, |
| 124 const base::FilePath& file_path)> | 124 const base::FilePath& file_path)> |
| 125 MarkMountedCallback; | 125 MarkMountedCallback; |
| 126 | 126 |
| 127 // Callback for GetCacheEntry. | 127 // Callback for GetCacheEntry. |
| 128 // |success| indicates if the operation was successful. | 128 typedef base::Callback<void(FileError error, const FileCacheEntry& cache_entry)> |
| 129 // |cache_entry| is the obtained cache entry. | |
| 130 typedef base::Callback<void(bool success, const FileCacheEntry& cache_entry)> | |
| 131 GetCacheEntryCallback; | 129 GetCacheEntryCallback; |
| 132 | 130 |
| 133 // Used to get file path. | 131 // Used to get file path. |
| 134 typedef base::Callback<void(FileError error, const base::FilePath& file_path)> | 132 typedef base::Callback<void(FileError error, const base::FilePath& file_path)> |
| 135 GetFilePathCallback; | 133 GetFilePathCallback; |
| 136 | 134 |
| 137 // The mode of opening a file. | 135 // The mode of opening a file. |
| 138 enum OpenMode { | 136 enum OpenMode { |
| 139 // Open the file if exists. If not, failed. | 137 // Open the file if exists. If not, failed. |
| 140 OPEN_FILE, | 138 OPEN_FILE, |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 virtual void Reset(const FileOperationCallback& callback) = 0; | 433 virtual void Reset(const FileOperationCallback& callback) = 0; |
| 436 | 434 |
| 437 // Finds a path of an entry (a file or a directory) by |resource_id|. | 435 // Finds a path of an entry (a file or a directory) by |resource_id|. |
| 438 virtual void GetPathFromResourceId(const std::string& resource_id, | 436 virtual void GetPathFromResourceId(const std::string& resource_id, |
| 439 const GetFilePathCallback& callback) = 0; | 437 const GetFilePathCallback& callback) = 0; |
| 440 }; | 438 }; |
| 441 | 439 |
| 442 } // namespace drive | 440 } // namespace drive |
| 443 | 441 |
| 444 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ | 442 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_INTERFACE_H_ |
| OLD | NEW |