summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authormtomasz <mtomasz@chromium.org>2015-02-12 20:41:22 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-13 04:42:08 +0000
commit675ecaa1adcfbbca7b9c7c2ea116c4fd8bda0f95 (patch)
treea993f538ea25aa157e961f2f59aaa4881f984f69 /storage
parent357fcdaa1150bc7629984d8af02a1ae670c26e5b (diff)
downloadchromium_src-675ecaa1adcfbbca7b9c7c2ea116c4fd8bda0f95.zip
chromium_src-675ecaa1adcfbbca7b9c7c2ea116c4fd8bda0f95.tar.gz
chromium_src-675ecaa1adcfbbca7b9c7c2ea116c4fd8bda0f95.tar.bz2
Loosen restriction on mount point names.
Before, only ASCII characters were allowed, which is unnecessarily strict. This CL removes this restriction, and allows all strings, with an assumption they are UTF-8 encoded. TEST=Manually tested, see bug repro steps. BUG=457970 Review URL: https://codereview.chromium.org/913393002 Cr-Commit-Position: refs/heads/master@{#316165}
Diffstat (limited to 'storage')
-rw-r--r--storage/browser/fileapi/external_mount_points.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/storage/browser/fileapi/external_mount_points.cc b/storage/browser/fileapi/external_mount_points.cc
index 04b715f..d497b4d 100644
--- a/storage/browser/fileapi/external_mount_points.cc
+++ b/storage/browser/fileapi/external_mount_points.cc
@@ -161,9 +161,7 @@ bool ExternalMountPoints::CrackVirtualPath(
std::vector<base::FilePath::StringType>::iterator component_iter =
components.begin();
std::string maybe_mount_name =
- base::FilePath(*component_iter++).MaybeAsASCII();
- if (maybe_mount_name.empty())
- return false;
+ base::FilePath(*component_iter++).AsUTF8Unsafe();
base::FilePath cracked_path;
{
@@ -231,7 +229,7 @@ bool ExternalMountPoints::GetVirtualPath(const base::FilePath& path_in,
base::FilePath ExternalMountPoints::CreateVirtualRootPath(
const std::string& mount_name) const {
- return base::FilePath().AppendASCII(mount_name);
+ return base::FilePath().Append(base::FilePath::FromUTF8Unsafe(mount_name));
}
FileSystemURL ExternalMountPoints::CreateExternalFileSystemURL(