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

Unified Diff: webkit/common/fileapi/file_system_util.cc

Issue 312283002: [fsp] Fix incorrect handling of file system URLs when containing a %. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added regression tests. Created 6 years, 6 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
« no previous file with comments | « content/common/fileapi/file_system_util_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/common/fileapi/file_system_util.cc
diff --git a/webkit/common/fileapi/file_system_util.cc b/webkit/common/fileapi/file_system_util.cc
index a19136a1e9e20acf7add98ae88eb4f896a112350..ded3457ccf3efb2626c51f6491701a7adefefca5 100644
--- a/webkit/common/fileapi/file_system_util.cc
+++ b/webkit/common/fileapi/file_system_util.cc
@@ -454,12 +454,12 @@ std::string GetIsolatedFileSystemRootURIString(
kFileSystemTypeIsolated).spec();
if (base::FilePath::FromUTF8Unsafe(filesystem_id).ReferencesParent())
return std::string();
- root.append(filesystem_id);
+ root.append(net::EscapePath(filesystem_id));
root.append("/");
if (!optional_root_name.empty()) {
if (base::FilePath::FromUTF8Unsafe(optional_root_name).ReferencesParent())
return std::string();
- root.append(optional_root_name);
+ root.append(net::EscapePath(optional_root_name));
root.append("/");
}
return root;
@@ -472,7 +472,7 @@ std::string GetExternalFileSystemRootURIString(
kFileSystemTypeExternal).spec();
if (base::FilePath::FromUTF8Unsafe(mount_name).ReferencesParent())
return std::string();
- root.append(mount_name);
+ root.append(net::EscapePath(mount_name));
root.append("/");
return root;
}
« no previous file with comments | « content/common/fileapi/file_system_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698