| Index: base/file_util_proxy.h
|
| diff --git a/base/file_util_proxy.h b/base/file_util_proxy.h
|
| index 0b2cae5f770a1d3ba187e3a8db4bb6d301a4e2d6..954c451ed31260d285480dc96b04e8dbacd7562d 100644
|
| --- a/base/file_util_proxy.h
|
| +++ b/base/file_util_proxy.h
|
| @@ -17,7 +17,7 @@
|
|
|
| namespace base {
|
|
|
| -class MessageLoopProxy;
|
| +class TaskRunner;
|
| class Time;
|
|
|
| // This class provides asynchronous access to common file routines.
|
| @@ -59,7 +59,7 @@ class BASE_EXPORT FileUtilProxy {
|
| // callback. If PLATFORM_FILE_CREATE is set in |file_flags| it always tries to
|
| // create a new file at the given |file_path| and calls back with
|
| // PLATFORM_FILE_ERROR_FILE_EXISTS if the |file_path| already exists.
|
| - static bool CreateOrOpen(scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + static bool CreateOrOpen(TaskRunner* task_runner,
|
| const FilePath& file_path,
|
| int file_flags,
|
| const CreateOrOpenCallback& callback);
|
| @@ -73,44 +73,44 @@ class BASE_EXPORT FileUtilProxy {
|
| // Set |additional_file_flags| to 0 for synchronous writes and set to
|
| // base::PLATFORM_FILE_ASYNC to support asynchronous file operations.
|
| static bool CreateTemporary(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| int additional_file_flags,
|
| const CreateTemporaryCallback& callback);
|
|
|
| // Close the given file handle.
|
| - static bool Close(scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + static bool Close(TaskRunner* task_runner,
|
| PlatformFile,
|
| const StatusCallback& callback);
|
|
|
| // Retrieves the information about a file. It is invalid to pass a null
|
| // callback.
|
| static bool GetFileInfo(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| const FilePath& file_path,
|
| const GetFileInfoCallback& callback);
|
|
|
| static bool GetFileInfoFromPlatformFile(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| PlatformFile file,
|
| const GetFileInfoCallback& callback);
|
|
|
| // Deletes a file or a directory.
|
| // It is an error to delete a non-empty directory with recursive=false.
|
| - static bool Delete(scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + static bool Delete(TaskRunner* task_runner,
|
| const FilePath& file_path,
|
| bool recursive,
|
| const StatusCallback& callback);
|
|
|
| // Deletes a directory and all of its contents.
|
| static bool RecursiveDelete(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| const FilePath& file_path,
|
| const StatusCallback& callback);
|
|
|
| // Reads from a file. On success, the file pointer is moved to position
|
| // |offset + bytes_to_read| in the file. The callback can be null.
|
| static bool Read(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| PlatformFile file,
|
| int64 offset,
|
| int bytes_to_read,
|
| @@ -121,7 +121,7 @@ class BASE_EXPORT FileUtilProxy {
|
| // |offset + bytes_to_write| in the file. The callback can be null.
|
| // |bytes_to_write| must be greater than zero.
|
| static bool Write(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| PlatformFile file,
|
| int64 offset,
|
| const char* buffer,
|
| @@ -130,7 +130,7 @@ class BASE_EXPORT FileUtilProxy {
|
|
|
| // Touches a file. The callback can be null.
|
| static bool Touch(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| PlatformFile file,
|
| const Time& last_access_time,
|
| const Time& last_modified_time,
|
| @@ -138,7 +138,7 @@ class BASE_EXPORT FileUtilProxy {
|
|
|
| // Touches a file. The callback can be null.
|
| static bool Touch(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| const FilePath& file_path,
|
| const Time& last_access_time,
|
| const Time& last_modified_time,
|
| @@ -148,7 +148,7 @@ class BASE_EXPORT FileUtilProxy {
|
| // current length of the file, the file will be extended with zeroes.
|
| // The callback can be null.
|
| static bool Truncate(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| PlatformFile file,
|
| int64 length,
|
| const StatusCallback& callback);
|
| @@ -157,32 +157,32 @@ class BASE_EXPORT FileUtilProxy {
|
| // current length of the file, the file will be extended with zeroes.
|
| // The callback can be null.
|
| static bool Truncate(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| const FilePath& path,
|
| int64 length,
|
| const StatusCallback& callback);
|
|
|
| // Flushes a file. The callback can be null.
|
| static bool Flush(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| PlatformFile file,
|
| const StatusCallback& callback);
|
|
|
| // Relay helpers.
|
| static bool RelayFileTask(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| const tracked_objects::Location& from_here,
|
| const FileTask& task,
|
| const StatusCallback& callback);
|
|
|
| static bool RelayCreateOrOpen(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| const CreateOrOpenTask& open_task,
|
| const CloseTask& close_task,
|
| const CreateOrOpenCallback& callback);
|
|
|
| static bool RelayClose(
|
| - scoped_refptr<MessageLoopProxy> message_loop_proxy,
|
| + TaskRunner* task_runner,
|
| const CloseTask& close_task,
|
| PlatformFile,
|
| const StatusCallback& callback);
|
|
|