summaryrefslogtreecommitdiff
path: root/chromium/webkit/browser/fileapi/isolated_context.cc
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-03-18 13:16:26 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-20 15:55:39 +0100
commit3f0f86b0caed75241fa71c95a5d73bc0164348c5 (patch)
tree92b9fb00f2e9e90b0be2262093876d4f43b6cd13 /chromium/webkit/browser/fileapi/isolated_context.cc
parente90d7c4b152c56919d963987e2503f9909a666d2 (diff)
downloadqtwebengine-chromium-3f0f86b0caed75241fa71c95a5d73bc0164348c5.tar.gz
Update to new stable branch 1750
This also includes an updated ninja and chromium dependencies needed on Windows. Change-Id: Icd597d80ed3fa4425933c9f1334c3c2e31291c42 Reviewed-by: Zoltan Arvai <zarvai@inf.u-szeged.hu> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'chromium/webkit/browser/fileapi/isolated_context.cc')
-rw-r--r--chromium/webkit/browser/fileapi/isolated_context.cc30
1 files changed, 20 insertions, 10 deletions
diff --git a/chromium/webkit/browser/fileapi/isolated_context.cc b/chromium/webkit/browser/fileapi/isolated_context.cc
index d10438aa046..74716104154 100644
--- a/chromium/webkit/browser/fileapi/isolated_context.cc
+++ b/chromium/webkit/browser/fileapi/isolated_context.cc
@@ -26,8 +26,8 @@ base::FilePath::StringType GetRegisterNameForPath(const base::FilePath& path) {
#if defined(FILE_PATH_USES_DRIVE_LETTERS)
base::FilePath::StringType name;
for (size_t i = 0;
- i < path.value().size() && !base::FilePath::IsSeparator(path.value()[i]);
- ++i) {
+ i < path.value().size() && !base::FilePath::IsSeparator(path.value()[i]);
+ ++i) {
if (path.value()[i] == L':') {
name.append(L"_drive");
break;
@@ -78,8 +78,10 @@ bool IsolatedContext::FileInfoSet::AddPath(
fileset_.insert(MountPointInfo(utf8name, normalized_path)).second;
if (!inserted) {
int suffix = 1;
- std::string basepart = base::FilePath(name).RemoveExtension().AsUTF8Unsafe();
- std::string ext = base::FilePath(base::FilePath(name).Extension()).AsUTF8Unsafe();
+ std::string basepart =
+ base::FilePath(name).RemoveExtension().AsUTF8Unsafe();
+ std::string ext =
+ base::FilePath(base::FilePath(name).Extension()).AsUTF8Unsafe();
while (!inserted) {
utf8name = base::StringPrintf("%s (%d)", basepart.c_str(), suffix++);
if (!ext.empty())
@@ -286,10 +288,12 @@ bool IsolatedContext::GetRegisteredPath(
return true;
}
-bool IsolatedContext::CrackVirtualPath(const base::FilePath& virtual_path,
- std::string* id_or_name,
- FileSystemType* type,
- base::FilePath* path) const {
+bool IsolatedContext::CrackVirtualPath(
+ const base::FilePath& virtual_path,
+ std::string* id_or_name,
+ FileSystemType* type,
+ base::FilePath* path,
+ FileSystemMountOption* mount_option) const {
DCHECK(id_or_name);
DCHECK(path);
@@ -297,6 +301,9 @@ bool IsolatedContext::CrackVirtualPath(const base::FilePath& virtual_path,
if (virtual_path.ReferencesParent())
return false;
+ // Set the default mount option.
+ *mount_option = FileSystemMountOption();
+
// The virtual_path should comprise <id_or_name> and <relative_path> parts.
std::vector<base::FilePath::StringType> components;
virtual_path.GetComponents(&components);
@@ -426,13 +433,16 @@ FileSystemURL IsolatedContext::CrackFileSystemURL(
std::string mount_name;
FileSystemType cracked_type;
base::FilePath cracked_path;
- if (!CrackVirtualPath(url.path(), &mount_name, &cracked_type, &cracked_path))
+ FileSystemMountOption cracked_mount_option;
+ if (!CrackVirtualPath(url.path(), &mount_name, &cracked_type,
+ &cracked_path, &cracked_mount_option)) {
return FileSystemURL();
+ }
return FileSystemURL(
url.origin(), url.mount_type(), url.virtual_path(),
!url.filesystem_id().empty() ? url.filesystem_id() : mount_name,
- cracked_type, cracked_path, mount_name);
+ cracked_type, cracked_path, mount_name, cracked_mount_option);
}
bool IsolatedContext::UnregisterFileSystem(const std::string& filesystem_id) {