summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/fileapi
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/fileapi
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/fileapi')
-rw-r--r--Source/WebCore/fileapi/DOMFileSystem.cpp2
-rw-r--r--Source/WebCore/fileapi/DOMFileSystemBase.cpp43
-rw-r--r--Source/WebCore/fileapi/DOMFileSystemBase.h17
-rw-r--r--Source/WebCore/fileapi/DOMFileSystemSync.cpp6
-rw-r--r--Source/WebCore/fileapi/DOMFileSystemSync.h6
-rw-r--r--Source/WebCore/fileapi/Entry.cpp11
-rw-r--r--Source/WebCore/fileapi/Entry.h2
-rw-r--r--Source/WebCore/fileapi/EntryBase.cpp70
-rw-r--r--Source/WebCore/fileapi/EntryBase.h13
-rw-r--r--Source/WebCore/fileapi/EntrySync.idl1
-rw-r--r--Source/WebCore/fileapi/FileReaderLoader.cpp2
-rw-r--r--Source/WebCore/fileapi/FileReaderLoader.h2
-rw-r--r--Source/WebCore/fileapi/FileSystemCallbacks.cpp59
-rw-r--r--Source/WebCore/fileapi/FileSystemCallbacks.h14
-rw-r--r--Source/WebCore/fileapi/LocalFileSystem.cpp2
-rw-r--r--Source/WebCore/fileapi/LocalFileSystem.h2
16 files changed, 213 insertions, 39 deletions
diff --git a/Source/WebCore/fileapi/DOMFileSystem.cpp b/Source/WebCore/fileapi/DOMFileSystem.cpp
index f4ebe7c..c1710cd 100644
--- a/Source/WebCore/fileapi/DOMFileSystem.cpp
+++ b/Source/WebCore/fileapi/DOMFileSystem.cpp
@@ -50,7 +50,7 @@
namespace WebCore {
DOMFileSystem::DOMFileSystem(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
- : DOMFileSystemBase(name, asyncFileSystem)
+ : DOMFileSystemBase(context, name, asyncFileSystem)
, ActiveDOMObject(context, this)
{
}
diff --git a/Source/WebCore/fileapi/DOMFileSystemBase.cpp b/Source/WebCore/fileapi/DOMFileSystemBase.cpp
index c462c3c..788d967 100644
--- a/Source/WebCore/fileapi/DOMFileSystemBase.cpp
+++ b/Source/WebCore/fileapi/DOMFileSystemBase.cpp
@@ -44,13 +44,47 @@
#include "FileError.h"
#include "FileSystemCallbacks.h"
#include "MetadataCallback.h"
+#include "ScriptExecutionContext.h"
#include "VoidCallback.h"
#include <wtf/OwnPtr.h>
namespace WebCore {
-DOMFileSystemBase::DOMFileSystemBase(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
- : m_name(name)
+const char DOMFileSystemBase::kPersistentPathPrefix[] = "persistent";
+const size_t DOMFileSystemBase::kPersistentPathPrefixLength = sizeof(DOMFileSystemBase::kPersistentPathPrefix) - 1;
+const char DOMFileSystemBase::kTemporaryPathPrefix[] = "temporary";
+const size_t DOMFileSystemBase::kTemporaryPathPrefixLength = sizeof(DOMFileSystemBase::kTemporaryPathPrefix) - 1;
+
+bool DOMFileSystemBase::crackFileSystemURL(const KURL& url, AsyncFileSystem::Type& type, String& filePath)
+{
+ if (!url.protocolIs("filesystem"))
+ return false;
+
+ KURL originURL(ParsedURLString, url.path());
+ String path = originURL.path();
+ if (path.isEmpty() || path[0] != '/')
+ return false;
+ path = path.substring(1);
+
+ if (path.startsWith(kTemporaryPathPrefix)) {
+ type = AsyncFileSystem::Temporary;
+ path = path.substring(kTemporaryPathPrefixLength);
+ } else if (path.startsWith(kPersistentPathPrefix)) {
+ type = AsyncFileSystem::Persistent;
+ path = path.substring(kPersistentPathPrefixLength);
+ } else
+ return false;
+
+ if (path.isEmpty() || path[0] != '/')
+ return false;
+
+ filePath.swap(path);
+ return true;
+}
+
+DOMFileSystemBase::DOMFileSystemBase(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+ : m_context(context)
+ , m_name(name)
, m_asyncFileSystem(asyncFileSystem)
{
}
@@ -59,6 +93,11 @@ DOMFileSystemBase::~DOMFileSystemBase()
{
}
+SecurityOrigin* DOMFileSystemBase::securityOrigin() const
+{
+ return m_context->securityOrigin();
+}
+
bool DOMFileSystemBase::getMetadata(const EntryBase* entry, PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
{
String platformPath = m_asyncFileSystem->virtualToPlatformPath(entry->fullPath());
diff --git a/Source/WebCore/fileapi/DOMFileSystemBase.h b/Source/WebCore/fileapi/DOMFileSystemBase.h
index 66f1331..6332b63 100644
--- a/Source/WebCore/fileapi/DOMFileSystemBase.h
+++ b/Source/WebCore/fileapi/DOMFileSystemBase.h
@@ -47,20 +47,30 @@ class EntriesCallback;
class EntryBase;
class EntryCallback;
class ErrorCallback;
+class KURL;
class MetadataCallback;
+class ScriptExecutionContext;
+class SecurityOrigin;
class VoidCallback;
// A common base class for DOMFileSystem and DOMFileSystemSync.
class DOMFileSystemBase : public RefCounted<DOMFileSystemBase> {
public:
- static PassRefPtr<DOMFileSystemBase> create(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+ static PassRefPtr<DOMFileSystemBase> create(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
{
- return adoptRef(new DOMFileSystemBase(name, asyncFileSystem));
+ return adoptRef(new DOMFileSystemBase(context, name, asyncFileSystem));
}
virtual ~DOMFileSystemBase();
+ static const char kPersistentPathPrefix[];
+ static const size_t kPersistentPathPrefixLength;
+ static const char kTemporaryPathPrefix[];
+ static const size_t kTemporaryPathPrefixLength;
+ static bool crackFileSystemURL(const KURL&, AsyncFileSystem::Type&, String& filePath);
+
const String& name() const { return m_name; }
AsyncFileSystem* asyncFileSystem() const { return m_asyncFileSystem.get(); }
+ SecurityOrigin* securityOrigin() const;
// Actual FileSystem API implementations. All the validity checks on virtual paths are done at this level.
// They return false for immediate errors that don't involve lower AsyncFileSystem layer (e.g. for name validation errors). Otherwise they return true (but later may call back with an runtime error).
@@ -75,9 +85,10 @@ public:
bool readDirectory(PassRefPtr<DirectoryReaderBase>, const String& path, PassRefPtr<EntriesCallback>, PassRefPtr<ErrorCallback>);
protected:
- DOMFileSystemBase(const String& name, PassOwnPtr<AsyncFileSystem>);
+ DOMFileSystemBase(ScriptExecutionContext*, const String& name, PassOwnPtr<AsyncFileSystem>);
friend class DOMFileSystemSync;
+ ScriptExecutionContext* m_context;
String m_name;
mutable OwnPtr<AsyncFileSystem> m_asyncFileSystem;
};
diff --git a/Source/WebCore/fileapi/DOMFileSystemSync.cpp b/Source/WebCore/fileapi/DOMFileSystemSync.cpp
index dcbc9c7..5ae7545 100644
--- a/Source/WebCore/fileapi/DOMFileSystemSync.cpp
+++ b/Source/WebCore/fileapi/DOMFileSystemSync.cpp
@@ -50,11 +50,11 @@ class FileWriterBase;
PassRefPtr<DOMFileSystemSync> DOMFileSystemSync::create(DOMFileSystemBase* fileSystem)
{
- return adoptRef(new DOMFileSystemSync(fileSystem->m_name, fileSystem->m_asyncFileSystem.release()));
+ return adoptRef(new DOMFileSystemSync(fileSystem->m_context, fileSystem->m_name, fileSystem->m_asyncFileSystem.release()));
}
-DOMFileSystemSync::DOMFileSystemSync(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
- : DOMFileSystemBase(name, asyncFileSystem)
+DOMFileSystemSync::DOMFileSystemSync(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+ : DOMFileSystemBase(context, name, asyncFileSystem)
{
}
diff --git a/Source/WebCore/fileapi/DOMFileSystemSync.h b/Source/WebCore/fileapi/DOMFileSystemSync.h
index ce07c85..0120fb0 100644
--- a/Source/WebCore/fileapi/DOMFileSystemSync.h
+++ b/Source/WebCore/fileapi/DOMFileSystemSync.h
@@ -46,9 +46,9 @@ typedef int ExceptionCode;
class DOMFileSystemSync : public DOMFileSystemBase {
public:
- static PassRefPtr<DOMFileSystemSync> create(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+ static PassRefPtr<DOMFileSystemSync> create(ScriptExecutionContext* context, const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
{
- return adoptRef(new DOMFileSystemSync(name, asyncFileSystem));
+ return adoptRef(new DOMFileSystemSync(context, name, asyncFileSystem));
}
static PassRefPtr<DOMFileSystemSync> create(DOMFileSystemBase*);
@@ -61,7 +61,7 @@ public:
PassRefPtr<FileWriterSync> createWriter(const FileEntrySync*, ExceptionCode&);
private:
- DOMFileSystemSync(const String& name, PassOwnPtr<AsyncFileSystem>);
+ DOMFileSystemSync(ScriptExecutionContext*, const String& name, PassOwnPtr<AsyncFileSystem>);
};
}
diff --git a/Source/WebCore/fileapi/Entry.cpp b/Source/WebCore/fileapi/Entry.cpp
index 53cd576..8b0f6ac 100644
--- a/Source/WebCore/fileapi/Entry.cpp
+++ b/Source/WebCore/fileapi/Entry.cpp
@@ -86,17 +86,6 @@ void Entry::getParent(PassRefPtr<EntryCallback> successCallback, PassRefPtr<Erro
filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
}
-String Entry::toURI()
-{
- StringBuilder uriBuilder;
- uriBuilder.append("filesystem:");
- uriBuilder.append(filesystem()->scriptExecutionContext()->securityOrigin()->toString());
- uriBuilder.append("/");
- uriBuilder.append(m_fileSystem->asyncFileSystem()->type() == AsyncFileSystem::Temporary ? "temporary" : "persistent");
- uriBuilder.append(m_fullPath);
- return uriBuilder.toString();
-}
-
} // namespace WebCore
#endif // ENABLE(FILE_SYSTEM)
diff --git a/Source/WebCore/fileapi/Entry.h b/Source/WebCore/fileapi/Entry.h
index d871262..09cc964 100644
--- a/Source/WebCore/fileapi/Entry.h
+++ b/Source/WebCore/fileapi/Entry.h
@@ -57,8 +57,6 @@ public:
void remove(PassRefPtr<VoidCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
void getParent(PassRefPtr<EntryCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;
- String toURI();
-
protected:
Entry(PassRefPtr<DOMFileSystemBase>, const String& fullPath);
};
diff --git a/Source/WebCore/fileapi/EntryBase.cpp b/Source/WebCore/fileapi/EntryBase.cpp
new file mode 100644
index 0000000..ad3bec0
--- /dev/null
+++ b/Source/WebCore/fileapi/EntryBase.cpp
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "EntryBase.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include "DOMFilePath.h"
+#include "DOMFileSystemBase.h"
+#include "PlatformString.h"
+#include "SecurityOrigin.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/text/StringBuilder.h>
+
+namespace WebCore {
+
+EntryBase::EntryBase(PassRefPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
+ : m_fileSystem(fileSystem)
+ , m_fullPath(fullPath)
+ , m_name(DOMFilePath::getName(fullPath))
+{
+}
+
+EntryBase::~EntryBase()
+{
+}
+
+String EntryBase::toURI()
+{
+ StringBuilder result;
+ result.append("filesystem:");
+ result.append(m_fileSystem->securityOrigin()->toString());
+ result.append("/");
+ result.append(m_fileSystem->asyncFileSystem()->type() == AsyncFileSystem::Temporary ? DOMFileSystemBase::kTemporaryPathPrefix : DOMFileSystemBase::kPersistentPathPrefix);
+ result.append(m_fullPath);
+ return result.toString();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/Source/WebCore/fileapi/EntryBase.h b/Source/WebCore/fileapi/EntryBase.h
index 16f93ba..babd295 100644
--- a/Source/WebCore/fileapi/EntryBase.h
+++ b/Source/WebCore/fileapi/EntryBase.h
@@ -33,7 +33,6 @@
#if ENABLE(FILE_SYSTEM)
-#include "DOMFilePath.h"
#include "PlatformString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -46,7 +45,7 @@ class EntrySync;
// A common base class for Entry and EntrySync.
class EntryBase : public RefCounted<EntryBase> {
public:
- virtual ~EntryBase() { }
+ virtual ~EntryBase();
DOMFileSystemBase* filesystem() const { return m_fileSystem.get(); }
@@ -56,14 +55,10 @@ public:
const String& fullPath() const { return m_fullPath; }
const String& name() const { return m_name; }
-protected:
- EntryBase(PassRefPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
- : m_fileSystem(fileSystem)
- , m_fullPath(fullPath)
- , m_name(DOMFilePath::getName(fullPath))
- {
- }
+ String toURI();
+protected:
+ EntryBase(PassRefPtr<DOMFileSystemBase>, const String& fullPath);
friend class EntrySync;
RefPtr<DOMFileSystemBase> m_fileSystem;
diff --git a/Source/WebCore/fileapi/EntrySync.idl b/Source/WebCore/fileapi/EntrySync.idl
index fb7ee3c..0a180e8 100644
--- a/Source/WebCore/fileapi/EntrySync.idl
+++ b/Source/WebCore/fileapi/EntrySync.idl
@@ -43,6 +43,7 @@ module storage {
Metadata getMetadata() raises (FileException);
EntrySync moveTo(in DirectoryEntrySync parent, in [ConvertUndefinedOrNullToNullString] DOMString name) raises (FileException);
EntrySync copyTo(in DirectoryEntrySync parent, in [ConvertUndefinedOrNullToNullString] DOMString name) raises (FileException);
+ DOMString toURI();
void remove() raises (FileException);
DirectoryEntrySync getParent();
};
diff --git a/Source/WebCore/fileapi/FileReaderLoader.cpp b/Source/WebCore/fileapi/FileReaderLoader.cpp
index 24904e2..07b32a6 100644
--- a/Source/WebCore/fileapi/FileReaderLoader.cpp
+++ b/Source/WebCore/fileapi/FileReaderLoader.cpp
@@ -176,7 +176,7 @@ void FileReaderLoader::didReceiveData(const char* data, int lengthReceived)
m_client->didReceiveData();
}
-void FileReaderLoader::didFinishLoading(unsigned long)
+void FileReaderLoader::didFinishLoading(unsigned long, double)
{
cleanup();
if (m_client)
diff --git a/Source/WebCore/fileapi/FileReaderLoader.h b/Source/WebCore/fileapi/FileReaderLoader.h
index a15ee01..7e3f442 100644
--- a/Source/WebCore/fileapi/FileReaderLoader.h
+++ b/Source/WebCore/fileapi/FileReaderLoader.h
@@ -68,7 +68,7 @@ public:
// ThreadableLoaderClient
virtual void didReceiveResponse(const ResourceResponse&);
virtual void didReceiveData(const char*, int);
- virtual void didFinishLoading(unsigned long identifier);
+ virtual void didFinishLoading(unsigned long, double);
virtual void didFail(const ResourceError&);
String stringResult();
diff --git a/Source/WebCore/fileapi/FileSystemCallbacks.cpp b/Source/WebCore/fileapi/FileSystemCallbacks.cpp
index 966337b..69fa53a 100644
--- a/Source/WebCore/fileapi/FileSystemCallbacks.cpp
+++ b/Source/WebCore/fileapi/FileSystemCallbacks.cpp
@@ -192,6 +192,65 @@ void FileSystemCallbacks::didOpenFileSystem(const String& name, PassOwnPtr<Async
m_successCallback.clear();
}
+// ResolveURICallbacks --------------------------------------------------------
+
+namespace {
+
+class ErrorCallbackWrapper : public ErrorCallback {
+public:
+ static PassRefPtr<ErrorCallbackWrapper> create(PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback, PassRefPtr<DirectoryEntry> root, const String& filePath)
+ {
+ return adoptRef(new ErrorCallbackWrapper(successCallback, errorCallback, root, filePath));
+ }
+
+ virtual bool handleEvent(FileError* error)
+ {
+ ASSERT(error);
+ if (error->code() == FileError::TYPE_MISMATCH_ERR)
+ m_root->getFile(m_filePath, 0, m_successCallback, m_errorCallback);
+ else if (m_errorCallback)
+ m_errorCallback->handleEvent(error);
+ return true;
+ }
+
+private:
+ ErrorCallbackWrapper(PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback, PassRefPtr<DirectoryEntry> root, const String& filePath)
+ : m_successCallback(successCallback)
+ , m_errorCallback(errorCallback)
+ , m_root(root)
+ , m_filePath(filePath)
+ {
+ ASSERT(m_root);
+ }
+
+ RefPtr<EntryCallback> m_successCallback;
+ RefPtr<ErrorCallback> m_errorCallback;
+ RefPtr<DirectoryEntry> m_root;
+ String m_filePath;
+};
+
+} // namespace
+
+PassOwnPtr<ResolveURICallbacks> ResolveURICallbacks::create(PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback, ScriptExecutionContext* scriptExecutionContext, const String& filePath)
+{
+ return adoptPtr(new ResolveURICallbacks(successCallback, errorCallback, scriptExecutionContext, filePath));
+}
+
+ResolveURICallbacks::ResolveURICallbacks(PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback, ScriptExecutionContext* context, const String& filePath)
+ : FileSystemCallbacksBase(errorCallback)
+ , m_successCallback(successCallback)
+ , m_scriptExecutionContext(context)
+ , m_filePath(filePath)
+{
+}
+
+void ResolveURICallbacks::didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem> asyncFileSystem)
+{
+ ASSERT(asyncFileSystem);
+ RefPtr<DirectoryEntry> root = DOMFileSystem::create(m_scriptExecutionContext.get(), name, asyncFileSystem.leakPtr())->root();
+ root->getDirectory(m_filePath, 0, m_successCallback, ErrorCallbackWrapper::create(m_successCallback, m_errorCallback, root, m_filePath));
+}
+
// MetadataCallbacks ----------------------------------------------------------
PassOwnPtr<MetadataCallbacks> MetadataCallbacks::create(PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
diff --git a/Source/WebCore/fileapi/FileSystemCallbacks.h b/Source/WebCore/fileapi/FileSystemCallbacks.h
index 83000c2..7f68625 100644
--- a/Source/WebCore/fileapi/FileSystemCallbacks.h
+++ b/Source/WebCore/fileapi/FileSystemCallbacks.h
@@ -43,10 +43,10 @@ namespace WebCore {
class AsyncFileWriter;
class DOMFileSystemBase;
class DirectoryReaderBase;
-class ErrorCallback;
class EntriesCallback;
class EntryArray;
class EntryCallback;
+class ErrorCallback;
struct FileMetadata;
class FileSystemCallback;
class FileWriterBase;
@@ -123,6 +123,18 @@ private:
RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
};
+class ResolveURICallbacks : public FileSystemCallbacksBase {
+public:
+ static PassOwnPtr<ResolveURICallbacks> create(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, const String& filePath);
+ virtual void didOpenFileSystem(const String& name, PassOwnPtr<AsyncFileSystem>);
+
+private:
+ ResolveURICallbacks(PassRefPtr<EntryCallback>, PassRefPtr<ErrorCallback>, ScriptExecutionContext*, const String& filePath);
+ RefPtr<EntryCallback> m_successCallback;
+ RefPtr<ScriptExecutionContext> m_scriptExecutionContext;
+ String m_filePath;
+};
+
class MetadataCallbacks : public FileSystemCallbacksBase {
public:
static PassOwnPtr<MetadataCallbacks> create(PassRefPtr<MetadataCallback>, PassRefPtr<ErrorCallback>);
diff --git a/Source/WebCore/fileapi/LocalFileSystem.cpp b/Source/WebCore/fileapi/LocalFileSystem.cpp
index 721fdf5..688d155 100644
--- a/Source/WebCore/fileapi/LocalFileSystem.cpp
+++ b/Source/WebCore/fileapi/LocalFileSystem.cpp
@@ -81,7 +81,7 @@ static void openFileSystem(ScriptExecutionContext*, const String& basePath, cons
AsyncFileSystem::openFileSystem(basePath, identifier, type, create, callbacks);
}
-void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+void LocalFileSystem::readFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, 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));
diff --git a/Source/WebCore/fileapi/LocalFileSystem.h b/Source/WebCore/fileapi/LocalFileSystem.h
index 12a7012..baf72d9 100644
--- a/Source/WebCore/fileapi/LocalFileSystem.h
+++ b/Source/WebCore/fileapi/LocalFileSystem.h
@@ -54,7 +54,7 @@ public:
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 readFileSystem(ScriptExecutionContext*, AsyncFileSystem::Type, PassOwnPtr<AsyncFileSystemCallbacks>);
void requestFileSystem(ScriptExecutionContext*, AsyncFileSystem::Type, long long size, PassOwnPtr<AsyncFileSystemCallbacks>, bool synchronous = false);