| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Requests reading a file previously opened with |file_handle|. The callback | 94 // 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 | 95 // can be called multiple times until |has_more| is set to false. On success |
| 96 // it should return |length| bytes starting from |offset| in total. It can | 96 // it should return |length| bytes starting from |offset| in total. It can |
| 97 // return less only in case EOF is encountered. | 97 // return less only in case EOF is encountered. |
| 98 virtual void ReadFile(int file_handle, | 98 virtual void ReadFile(int file_handle, |
| 99 net::IOBuffer* buffer, | 99 net::IOBuffer* buffer, |
| 100 int64 offset, | 100 int64 offset, |
| 101 int length, | 101 int length, |
| 102 const ReadChunkReceivedCallback& callback) = 0; | 102 const ReadChunkReceivedCallback& callback) = 0; |
| 103 | 103 |
| 104 // Requests creating a directory. If |recursive| is passed, then all non |
| 105 // existing directories on the path will be created. If |exclusive| is true, |
| 106 // then creating the directory will fail, if it already exists. |
| 107 virtual void CreateDirectory( |
| 108 const base::FilePath& directory_path, |
| 109 bool exclusive, |
| 110 bool recursive, |
| 111 const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; |
| 112 |
| 104 // Returns a provided file system info for this file system. | 113 // Returns a provided file system info for this file system. |
| 105 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; | 114 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; |
| 106 | 115 |
| 107 // Returns a request manager for the file system. | 116 // Returns a request manager for the file system. |
| 108 virtual RequestManager* GetRequestManager() = 0; | 117 virtual RequestManager* GetRequestManager() = 0; |
| 109 | 118 |
| 110 // Returns a weak pointer to this object. | 119 // Returns a weak pointer to this object. |
| 111 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; | 120 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; |
| 112 }; | 121 }; |
| 113 | 122 |
| 114 } // namespace file_system_provider | 123 } // namespace file_system_provider |
| 115 } // namespace chromeos | 124 } // namespace chromeos |
| 116 | 125 |
| 117 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ | 126 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ |
| OLD | NEW |