| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/callback.h" | 10 #include "base/callback.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 ReadWriteCallback* callback); | 148 ReadWriteCallback* callback); |
| 149 | 149 |
| 150 // Touches a file. The callback can be NULL. | 150 // Touches a file. The callback can be NULL. |
| 151 static bool Touch( | 151 static bool Touch( |
| 152 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 152 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
| 153 base::PlatformFile file, | 153 base::PlatformFile file, |
| 154 const base::Time& last_access_time, | 154 const base::Time& last_access_time, |
| 155 const base::Time& last_modified_time, | 155 const base::Time& last_modified_time, |
| 156 StatusCallback* callback); | 156 StatusCallback* callback); |
| 157 | 157 |
| 158 // Touches a file. The callback can be NULL. |
| 159 static bool Touch( |
| 160 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
| 161 const FilePath& file_path, |
| 162 const base::Time& last_access_time, |
| 163 const base::Time& last_modified_time, |
| 164 StatusCallback* callback); |
| 165 |
| 158 // Truncates a file to the given length. If |length| is greater than the | 166 // Truncates a file to the given length. If |length| is greater than the |
| 159 // current length of the file, the file will be extended with zeroes. | 167 // current length of the file, the file will be extended with zeroes. |
| 160 // The callback can be NULL. | 168 // The callback can be NULL. |
| 161 static bool Truncate( | 169 static bool Truncate( |
| 162 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 170 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
| 163 base::PlatformFile file, | 171 base::PlatformFile file, |
| 164 long long length, | 172 long long length, |
| 165 StatusCallback* callback); | 173 StatusCallback* callback); |
| 166 | 174 |
| 167 // Flushes a file. The callback can be NULL. | 175 // Flushes a file. The callback can be NULL. |
| 168 static bool Flush( | 176 static bool Flush( |
| 169 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 177 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
| 170 base::PlatformFile file, | 178 base::PlatformFile file, |
| 171 StatusCallback* callback); | 179 StatusCallback* callback); |
| 172 | 180 |
| 173 private: | 181 private: |
| 174 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilProxy); | 182 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilProxy); |
| 175 }; | 183 }; |
| 176 | 184 |
| 177 } // namespace base | 185 } // namespace base |
| 178 | 186 |
| 179 #endif // BASE_FILE_UTIL_PROXY_H_ | 187 #endif // BASE_FILE_UTIL_PROXY_H_ |
| OLD | NEW |