| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 BASE_FILE_UTIL_PROXY_H_ | 5 #ifndef BASE_FILE_UTIL_PROXY_H_ |
| 6 #define BASE_FILE_UTIL_PROXY_H_ | 6 #define BASE_FILE_UTIL_PROXY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 static bool Read( | 161 static bool Read( |
| 162 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 162 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
| 163 PlatformFile file, | 163 PlatformFile file, |
| 164 int64 offset, | 164 int64 offset, |
| 165 int bytes_to_read, | 165 int bytes_to_read, |
| 166 ReadCallback* callback); | 166 ReadCallback* callback); |
| 167 | 167 |
| 168 // Writes to a file. If |offset| is greater than the length of the file, | 168 // Writes to a file. If |offset| is greater than the length of the file, |
| 169 // |false| is returned. On success, the file pointer is moved to position | 169 // |false| is returned. On success, the file pointer is moved to position |
| 170 // |offset + bytes_to_write| in the file. The callback can be NULL. | 170 // |offset + bytes_to_write| in the file. The callback can be NULL. |
| 171 // |bytes_to_write| must be greater than zero. |
| 171 static bool Write( | 172 static bool Write( |
| 172 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 173 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
| 173 PlatformFile file, | 174 PlatformFile file, |
| 174 int64 offset, | 175 int64 offset, |
| 175 const char* buffer, | 176 const char* buffer, |
| 176 int bytes_to_write, | 177 int bytes_to_write, |
| 177 WriteCallback* callback); | 178 WriteCallback* callback); |
| 178 | 179 |
| 179 // Touches a file. The callback can be NULL. | 180 // Touches a file. The callback can be NULL. |
| 180 static bool Touch( | 181 static bool Touch( |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 PlatformFile file, | 217 PlatformFile file, |
| 217 StatusCallback* callback); | 218 StatusCallback* callback); |
| 218 | 219 |
| 219 private: | 220 private: |
| 220 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilProxy); | 221 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilProxy); |
| 221 }; | 222 }; |
| 222 | 223 |
| 223 } // namespace base | 224 } // namespace base |
| 224 | 225 |
| 225 #endif // BASE_FILE_UTIL_PROXY_H_ | 226 #endif // BASE_FILE_UTIL_PROXY_H_ |
| OLD | NEW |