summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 10:11:37 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-18 10:11:37 +0000
commit0e4fefa0ed7b27dbea2a40013c5e7fbddbfaada7 (patch)
treee65ffd80d3498695aede972f59d5e9753d769ffe /webkit/fileapi
parent71a90b359b9227b75f4409d9f72f8daebe3dc968 (diff)
downloadchromium_src-0e4fefa0ed7b27dbea2a40013c5e7fbddbfaada7.zip
chromium_src-0e4fefa0ed7b27dbea2a40013c5e7fbddbfaada7.tar.gz
chromium_src-0e4fefa0ed7b27dbea2a40013c5e7fbddbfaada7.tar.bz2
Adding isolated filesystem support in GetFileSystemRootURI
It wasn't needed for drag-and-drop but platform native access seems to need this. http://codereview.chromium.org/10332071 BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10332240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r--webkit/fileapi/file_system_util.cc5
-rw-r--r--webkit/fileapi/file_system_util.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
index 697ea04..cf3081d 100644
--- a/webkit/fileapi/file_system_util.cc
+++ b/webkit/fileapi/file_system_util.cc
@@ -149,11 +149,12 @@ GURL GetFileSystemRootURI(const GURL& origin_url, FileSystemType type) {
case kFileSystemTypeExternal:
url += (kExternalDir + 1); // We don't want the leading slash.
return GURL(url + "/");
+ case kFileSystemTypeIsolated:
+ url += (kIsolatedDir + 1); // We don't want the leading slash.
+ return GURL(url + "/");
case kFileSystemTypeTest:
url += (kTestDir + 1); // We don't want the leading slash.
return GURL(url + "/");
- case kFileSystemTypeIsolated:
- // Falling through; we won't call this for isolated filesystems.
case kFileSystemTypeUnknown:
NOTREACHED();
}
diff --git a/webkit/fileapi/file_system_util.h b/webkit/fileapi/file_system_util.h
index 5ac08af..631906e 100644
--- a/webkit/fileapi/file_system_util.h
+++ b/webkit/fileapi/file_system_util.h
@@ -61,6 +61,9 @@ class VirtualPath {
// |origin_url| and |type|. The returned URI can be used as a root path
// of the filesystem (e.g. <returned_URI> + "/relative/path" will compose
// a path pointing to the entry "/relative/path" in the filesystem).
+//
+// For Isolated filesystem this returns the 'common' root part, e.g.
+// returns URL without the filesystem ID.
GURL GetFileSystemRootURI(const GURL& origin_url, FileSystemType type);
// Returns the name for the filesystem that is specified by a pair of