diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-03 09:55:33 +0100 |
| commit | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch) | |
| tree | 8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/WebCore/fileapi/DOMFileSystemBase.cpp | |
| parent | d11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff) | |
| download | qtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz | |
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/WebCore/fileapi/DOMFileSystemBase.cpp')
| -rw-r--r-- | Source/WebCore/fileapi/DOMFileSystemBase.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/Source/WebCore/fileapi/DOMFileSystemBase.cpp b/Source/WebCore/fileapi/DOMFileSystemBase.cpp index ec8ef725a..2135f2bbc 100644 --- a/Source/WebCore/fileapi/DOMFileSystemBase.cpp +++ b/Source/WebCore/fileapi/DOMFileSystemBase.cpp @@ -50,43 +50,6 @@ namespace WebCore { -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; -const char DOMFileSystemBase::kExternalPathPrefix[] = "external"; -const size_t DOMFileSystemBase::kExternalPathPrefixLength = sizeof(DOMFileSystemBase::kExternalPathPrefix) - 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 = decodeURLEscapeSequences(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 if (path.startsWith(kExternalPathPrefix)) { - type = AsyncFileSystem::External; - path = path.substring(kExternalPathPrefixLength); - } 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) |
