diff options
Diffstat (limited to 'base/file_util_proxy.h')
-rw-r--r-- | base/file_util_proxy.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/base/file_util_proxy.h b/base/file_util_proxy.h index 872da44..30f051b 100644 --- a/base/file_util_proxy.h +++ b/base/file_util_proxy.h @@ -34,6 +34,8 @@ class BASE_EXPORT FileUtilProxy { // This callback is used by methods that report only an error code. It is // valid to pass NULL as the callback parameter to any function that takes a // StatusCallback, in which case the operation will complete silently. + // The ownership of |callback| is taken by the function and will always be + // deleted by the function even on failure. typedef Callback1<PlatformFileError /* error code */>::Type StatusCallback; typedef Callback3<PlatformFileError /* error code */, @@ -60,6 +62,7 @@ class BASE_EXPORT FileUtilProxy { // 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. + // Takes ownership of |callback| and will delete it even on failure. static bool CreateOrOpen(scoped_refptr<MessageLoopProxy> message_loop_proxy, const FilePath& file_path, int file_flags, |