base::Bind: Convert FileUtilProxy::WriteCallback.
BUG=none
TEST=none
R=csilv@chromium.org
Review URL: http://codereview.chromium.org/8321014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105912 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 4958f9fb8d57661a370ac4291a27b740daadbdd7
diff --git a/base/file_util_proxy.h b/base/file_util_proxy.h
index d86f797..b89c01e 100644
--- a/base/file_util_proxy.h
+++ b/base/file_util_proxy.h
@@ -55,8 +55,8 @@
typedef base::Callback<void(PlatformFileError /* error code */,
const char* /* data */,
int /* bytes read/written */)> ReadCallback;
- typedef Callback2<PlatformFileError /* error code */,
- int /* bytes written */>::Type WriteCallback;
+ typedef base::Callback<void(PlatformFileError /* error code */,
+ int /* bytes written */)> WriteCallback;
// Creates or opens a file with the given flags. It is invalid to pass a null
// callback. If PLATFORM_FILE_CREATE is set in |file_flags| it always tries to
@@ -169,7 +169,7 @@
// Writes to a file. If |offset| is greater than the length of the file,
// |false| is returned. On success, the file pointer is moved to position
- // |offset + bytes_to_write| in the file. The callback can be NULL.
+ // |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,
@@ -177,9 +177,9 @@
int64 offset,
const char* buffer,
int bytes_to_write,
- WriteCallback* callback);
+ const WriteCallback& callback);
- // Touches a file. The callback can be NULL.
+ // Touches a file. The callback can be null.
static bool Touch(
scoped_refptr<MessageLoopProxy> message_loop_proxy,
PlatformFile file,
@@ -187,7 +187,7 @@
const Time& last_modified_time,
StatusCallback* callback);
- // Touches a file. The callback can be NULL.
+ // Touches a file. The callback can be null.
static bool Touch(
scoped_refptr<MessageLoopProxy> message_loop_proxy,
const FilePath& file_path,
@@ -197,7 +197,7 @@
// Truncates a file to the given length. If |length| is greater than the
// current length of the file, the file will be extended with zeroes.
- // The callback can be NULL.
+ // The callback can be null.
static bool Truncate(
scoped_refptr<MessageLoopProxy> message_loop_proxy,
PlatformFile file,
@@ -206,14 +206,14 @@
// Truncates a file to the given length. If |length| is greater than the
// current length of the file, the file will be extended with zeroes.
- // The callback can be NULL.
+ // The callback can be null.
static bool Truncate(
scoped_refptr<MessageLoopProxy> message_loop_proxy,
const FilePath& path,
int64 length,
StatusCallback* callback);
- // Flushes a file. The callback can be NULL.
+ // Flushes a file. The callback can be null.
static bool Flush(
scoped_refptr<MessageLoopProxy> message_loop_proxy,
PlatformFile file,