summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/fileapi/file_system_util.cc')
-rw-r--r--webkit/fileapi/file_system_util.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
index 9b2aae0..24513d8 100644
--- a/webkit/fileapi/file_system_util.cc
+++ b/webkit/fileapi/file_system_util.cc
@@ -256,6 +256,30 @@ WebKit::WebFileError PlatformFileErrorToWebFileError(
}
}
+bool GetFileSystemPublicType(
+ const std::string type_string,
+ WebKit::WebFileSystem::Type* type) {
+ DCHECK(type);
+ if (type_string == "Temporary") {
+ *type = WebKit::WebFileSystem::TypeTemporary;
+ return true;
+ }
+ if (type_string == "Persistent") {
+ *type = WebKit::WebFileSystem::TypePersistent;
+ return true;
+ }
+ if (type_string == "Isolated") {
+ *type = WebKit::WebFileSystem::TypeIsolated;
+ return true;
+ }
+ if (type_string == "External") {
+ *type = WebKit::WebFileSystem::TypeExternal;
+ return true;
+ }
+ NOTREACHED();
+ return false;
+}
+
std::string GetIsolatedFileSystemName(const GURL& origin_url,
const std::string& filesystem_id) {
std::string name(fileapi::GetFileSystemName(origin_url,