summaryrefslogtreecommitdiffstats
path: root/webkit/browser/fileapi/async_file_util.h
diff options
context:
space:
mode:
authorhidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 07:55:18 +0000
committerhidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 07:55:18 +0000
commit969cbbe78bec88bad3a639bc4a76c256f997535b (patch)
treed8a7aad8c9626865c4838b321af1cc6f5b285b64 /webkit/browser/fileapi/async_file_util.h
parenta2bbb3a5060d98d7ce09fea74be26006aafbee35 (diff)
downloadchromium_src-969cbbe78bec88bad3a639bc4a76c256f997535b.zip
chromium_src-969cbbe78bec88bad3a639bc4a76c256f997535b.tar.gz
chromium_src-969cbbe78bec88bad3a639bc4a76c256f997535b.tar.bz2
Add on_close_callback to AsyncFileUtil::CreateOrOpenCallback.
This is preparation of the migration between LocalFileSystemOperation and RemoteFileSytemOperation. Especially, on ChromeOS Drive File System, it is necessary to call CloseFile on file closing, but currently we have no way to do it with AsyncFileUtil. This CL adds a callback for the behavior. The Drive File System side implementation will be done in another CL. BUG=258303 TEST=Ran unit_tests and broser_tests --gtest_filter="*FileSystemExtensionApiTest*:*FileManagerBrowserTest*" Review URL: https://chromiumcodereview.appspot.com/18856009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/browser/fileapi/async_file_util.h')
-rw-r--r--webkit/browser/fileapi/async_file_util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/browser/fileapi/async_file_util.h b/webkit/browser/fileapi/async_file_util.h
index e714c99..def2d2d 100644
--- a/webkit/browser/fileapi/async_file_util.h
+++ b/webkit/browser/fileapi/async_file_util.h
@@ -47,9 +47,13 @@ class WEBKIT_STORAGE_BROWSER_EXPORT AsyncFileUtil {
typedef base::Callback<
void(base::PlatformFileError result)> StatusCallback;
+ // |on_close_callback| will be called after the |file| is closed in the
+ // child process. |on_close_callback|.is_null() can be true, if no operation
+ // is needed on closing the file.
typedef base::Callback<
void(base::PlatformFileError result,
- base::PassPlatformFile file)> CreateOrOpenCallback;
+ base::PassPlatformFile file,
+ const base::Closure& on_close_callback)> CreateOrOpenCallback;
typedef base::Callback<
void(base::PlatformFileError result,