diff options
Diffstat (limited to 'Source/WebCore/fileapi/Entry.cpp')
-rw-r--r-- | Source/WebCore/fileapi/Entry.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/WebCore/fileapi/Entry.cpp b/Source/WebCore/fileapi/Entry.cpp index 9c3fa4e..53cd576 100644 --- a/Source/WebCore/fileapi/Entry.cpp +++ b/Source/WebCore/fileapi/Entry.cpp @@ -32,13 +32,17 @@ #if ENABLE(FILE_SYSTEM) +#include "AsyncFileSystem.h" #include "DirectoryEntry.h" #include "EntryCallback.h" #include "ErrorCallback.h" #include "FileError.h" #include "FileSystemCallbacks.h" #include "MetadataCallback.h" +#include "ScriptExecutionContext.h" +#include "SecurityOrigin.h" #include "VoidCallback.h" +#include <wtf/text/StringBuilder.h> namespace WebCore { @@ -82,11 +86,15 @@ void Entry::getParent(PassRefPtr<EntryCallback> successCallback, PassRefPtr<Erro filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR)); } -String Entry::toURI(const String&) +String Entry::toURI() { - // FIXME: to be implemented. - ASSERT_NOT_REACHED(); - return String(); + 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 |