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

Unified Diff: webkit/fileapi/file_system_util.cc

Issue 9016020: Cleanup FileSystemOperation for preparing for adding FSO-factory method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more cleanup around ValidateFileSystemRoot Created 9 years 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: webkit/fileapi/file_system_util.cc
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
index 7992fce447474184f499e619924af31026bcafd8..990e2a9ccce4732955c3707e73ca0e7f9d65abe7 100644
--- a/webkit/fileapi/file_system_util.cc
+++ b/webkit/fileapi/file_system_util.cc
@@ -96,8 +96,7 @@ bool CrackFileSystemURL(const GURL& url, GURL* origin_url, FileSystemType* type,
return true;
}
-GURL GetFileSystemRootURI(
- const GURL& origin_url, fileapi::FileSystemType type) {
+GURL GetFileSystemRootURI(const GURL& origin_url, FileSystemType type) {
std::string path("filesystem:");
path += origin_url.spec();
switch (type) {
@@ -117,6 +116,13 @@ GURL GetFileSystemRootURI(
return GURL(path);
}
+std::string GetFileSystemName(const GURL& origin_url, FileSystemType type) {
+ std::string origin_identifier = GetOriginIdentifierFromURL(origin_url);
+ std::string type_string = GetFileSystemTypeString(type);
+ DCHECK(!type_string.empty());
+ return origin_identifier + ":" + type_string;
+}
+
FileSystemType QuotaStorageTypeToFileSystemType(
quota::StorageType storage_type) {
switch (storage_type) {

Powered by Google App Engine
This is Rietveld 408576698