summaryrefslogtreecommitdiffstats
path: root/WebCore/fileapi
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2010-11-10 15:31:59 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2010-11-17 13:35:59 -0800
commit28040489d744e0c5d475a88663056c9040ed5320 (patch)
treec463676791e4a63e452a95f0a12b2a8519730693 /WebCore/fileapi
parenteff9be92c41913c92fb1d3b7983c071f3e718678 (diff)
downloadexternal_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz
external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/fileapi')
-rw-r--r--WebCore/fileapi/LocalFileSystem.cpp12
-rw-r--r--WebCore/fileapi/LocalFileSystem.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/WebCore/fileapi/LocalFileSystem.cpp b/WebCore/fileapi/LocalFileSystem.cpp
index c7347b8..721fdf5 100644
--- a/WebCore/fileapi/LocalFileSystem.cpp
+++ b/WebCore/fileapi/LocalFileSystem.cpp
@@ -76,15 +76,21 @@ String LocalFileSystem::fileSystemBasePath() const
return m_basePath;
}
-static void openFileSystem(ScriptExecutionContext*, const String& basePath, const String& identifier, AsyncFileSystem::Type type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+static void openFileSystem(ScriptExecutionContext*, const String& basePath, const String& identifier, AsyncFileSystem::Type type, bool create, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- AsyncFileSystem::openFileSystem(basePath, identifier, type, callbacks);
+ AsyncFileSystem::openFileSystem(basePath, identifier, type, create, callbacks);
+}
+
+void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ // AsyncFileSystem::openFileSystem calls callbacks synchronously, so the method needs to be called asynchronously.
+ context->postTask(createCallbackTask(&openFileSystem, fileSystemBasePath(), context->securityOrigin()->databaseIdentifier(), type, false, callbacks));
}
void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool)
{
// AsyncFileSystem::openFileSystem calls callbacks synchronously, so the method needs to be called asynchronously.
- context->postTask(createCallbackTask(&openFileSystem, fileSystemBasePath(), context->securityOrigin()->databaseIdentifier(), type, callbacks));
+ context->postTask(createCallbackTask(&openFileSystem, fileSystemBasePath(), context->securityOrigin()->databaseIdentifier(), type, true, callbacks));
}
} // namespace
diff --git a/WebCore/fileapi/LocalFileSystem.h b/WebCore/fileapi/LocalFileSystem.h
index 9d8ae65..b779a5f 100644
--- a/WebCore/fileapi/LocalFileSystem.h
+++ b/WebCore/fileapi/LocalFileSystem.h
@@ -52,6 +52,9 @@ public:
// calling this one.
static LocalFileSystem& localFileSystem();
+ // Does not create the root path for file system, just reads it if available.
+ void readFileSystem(ScriptExecutionContext*, AsyncFileSystem::Type, long long size, PassOwnPtr<AsyncFileSystemCallbacks>);
+
void requestFileSystem(ScriptExecutionContext*, AsyncFileSystem::Type, long long size, PassOwnPtr<AsyncFileSystemCallbacks>, bool synchronous = false);
#if !PLATFORM(CHROMIUM)