Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Unified Diff: Source/modules/filesystem/DOMFileSystemBase.cpp

Issue 23537011: FileAPI: Add WebFileSystem::resolveURL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/filesystem/DOMFileSystemBase.cpp
diff --git a/Source/modules/filesystem/DOMFileSystemBase.cpp b/Source/modules/filesystem/DOMFileSystemBase.cpp
index 7f9d8dedb3f677e33fedfe69d3b1d1e5ed24f2fe..fbaf868fb32263cbffc9e801fdc92343500aed01 100644
--- a/Source/modules/filesystem/DOMFileSystemBase.cpp
+++ b/Source/modules/filesystem/DOMFileSystemBase.cpp
@@ -138,6 +138,19 @@ KURL DOMFileSystemBase::createFileSystemURL(const String& fullPath) const
return url;
}
+bool DOMFileSystemBase::pathToAbsolutePath(FileSystemType type, const EntryBase* base, String path, String& absolutePath)
+{
+ ASSERT(base);
+
+ if (!DOMFilePath::isAbsolute(path))
+ path = DOMFilePath::append(base->fullPath(), path);
+ absolutePath = DOMFilePath::removeExtraParentReferences(path);
+
+ if ((type == FileSystemTypeTemporary || type == FileSystemTypePersistent) && !DOMFilePath::isValidPath(absolutePath))
+ return false;
+ return true;
+}
+
bool DOMFileSystemBase::getMetadata(const EntryBase* entry, PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
OwnPtr<MetadataCallbacks> callbacks(MetadataCallbacks::create(successCallback, errorCallback));
@@ -175,19 +188,6 @@ static bool verifyAndGetDestinationPathForCopyOrMove(const EntryBase* source, En
return true;
}
-static bool pathToAbsolutePath(FileSystemType type, const EntryBase* base, String path, String& absolutePath)
-{
- ASSERT(base);
-
- if (!DOMFilePath::isAbsolute(path))
- path = DOMFilePath::append(base->fullPath(), path);
- absolutePath = DOMFilePath::removeExtraParentReferences(path);
-
- if ((type == FileSystemTypeTemporary || type == FileSystemTypePersistent) && !DOMFilePath::isValidPath(absolutePath))
- return false;
- return true;
-}
-
bool DOMFileSystemBase::move(const EntryBase* source, EntryBase* parent, const String& newName, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
String destinationPath;

Powered by Google App Engine
This is Rietveld 408576698