From cd44dc59cdfc39534aef4d417e9f3c412e3be139 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 3 Feb 2012 09:55:33 +0100 Subject: Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560) --- Source/WebCore/fileapi/DOMFileSystemBase.cpp | 37 ---------------------------- 1 file changed, 37 deletions(-) (limited to 'Source/WebCore/fileapi/DOMFileSystemBase.cpp') 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) : m_context(context) , m_name(name) -- cgit v1.2.1