| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // or a directory. | 71 // or a directory. |
| 72 virtual void GetMetadata(const base::FilePath& entry_path, | 72 virtual void GetMetadata(const base::FilePath& entry_path, |
| 73 const GetMetadataCallback& callback) = 0; | 73 const GetMetadataCallback& callback) = 0; |
| 74 | 74 |
| 75 // Requests enumerating entries from the passed |directory_path|. The callback | 75 // Requests enumerating entries from the passed |directory_path|. The callback |
| 76 // can be called multiple times until |has_more| is set to false. | 76 // can be called multiple times until |has_more| is set to false. |
| 77 virtual void ReadDirectory( | 77 virtual void ReadDirectory( |
| 78 const base::FilePath& directory_path, | 78 const base::FilePath& directory_path, |
| 79 const fileapi::AsyncFileUtil::ReadDirectoryCallback& callback) = 0; | 79 const fileapi::AsyncFileUtil::ReadDirectoryCallback& callback) = 0; |
| 80 | 80 |
| 81 // Requests opening a file at |file_path|. If |create| is set to true, it will | 81 // Requests opening a file at |file_path|. If the file doesn't exist, then the |
| 82 // create a file and return success in case it didn't exist. | 82 // operation will fail. |
| 83 virtual void OpenFile(const base::FilePath& file_path, | 83 virtual void OpenFile(const base::FilePath& file_path, |
| 84 OpenFileMode mode, | 84 OpenFileMode mode, |
| 85 bool create, | |
| 86 const OpenFileCallback& callback) = 0; | 85 const OpenFileCallback& callback) = 0; |
| 87 | 86 |
| 88 // Requests closing a file, previously opened with OpenFile() as a file with | 87 // Requests closing a file, previously opened with OpenFile() as a file with |
| 89 // |file_handle|. For either succes or error |callback| must be called. | 88 // |file_handle|. For either succes or error |callback| must be called. |
| 90 virtual void CloseFile( | 89 virtual void CloseFile( |
| 91 int file_handle, | 90 int file_handle, |
| 92 const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; | 91 const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; |
| 93 | 92 |
| 94 // Requests reading a file previously opened with |file_handle|. The callback | 93 // Requests reading a file previously opened with |file_handle|. The callback |
| 95 // can be called multiple times until |has_more| is set to false. On success | 94 // can be called multiple times until |has_more| is set to false. On success |
| (...skipping 12 matching lines...) Expand all Loading... |
| 108 virtual RequestManager* GetRequestManager() = 0; | 107 virtual RequestManager* GetRequestManager() = 0; |
| 109 | 108 |
| 110 // Returns a weak pointer to this object. | 109 // Returns a weak pointer to this object. |
| 111 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; | 110 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; |
| 112 }; | 111 }; |
| 113 | 112 |
| 114 } // namespace file_system_provider | 113 } // namespace file_system_provider |
| 115 } // namespace chromeos | 114 } // namespace chromeos |
| 116 | 115 |
| 117 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ | 116 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ |
| OLD | NEW |