summaryrefslogtreecommitdiff
path: root/chromium/webkit/browser/fileapi/local_file_util.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/local_file_util.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/local_file_util.cc')
-rw-r--r--chromium/webkit/browser/fileapi/local_file_util.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/chromium/webkit/browser/fileapi/local_file_util.cc b/chromium/webkit/browser/fileapi/local_file_util.cc
index d2d653ac78c..8f47859a187 100644
--- a/chromium/webkit/browser/fileapi/local_file_util.cc
+++ b/chromium/webkit/browser/fileapi/local_file_util.cc
@@ -51,7 +51,7 @@ class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
base::FilePath LocalFileEnumerator::Next() {
base::FilePath next = file_enum_.Next();
// Don't return symlinks.
- while (!next.empty() && file_util::IsLink(next))
+ while (!next.empty() && base::IsLink(next))
next = file_enum_.Next();
if (next.empty())
return next;
@@ -88,7 +88,7 @@ PlatformFileError LocalFileUtil::CreateOrOpen(
if (error != base::PLATFORM_FILE_OK)
return error;
// Disallow opening files in symlinked paths.
- if (file_util::IsLink(file_path))
+ if (base::IsLink(file_path))
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
return NativeFileUtil::CreateOrOpen(
file_path, file_flags, file_handle, created);
@@ -132,7 +132,7 @@ PlatformFileError LocalFileUtil::GetFileInfo(
if (error != base::PLATFORM_FILE_OK)
return error;
// We should not follow symbolic links in sandboxed file system.
- if (file_util::IsLink(file_path))
+ if (base::IsLink(file_path))
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
error = NativeFileUtil::GetFileInfo(file_path, file_info);
if (error == base::PLATFORM_FILE_OK)
@@ -197,6 +197,7 @@ PlatformFileError LocalFileUtil::CopyOrMoveFile(
FileSystemOperationContext* context,
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
+ CopyOrMoveOption option,
bool copy) {
base::FilePath src_file_path;
PlatformFileError error = GetLocalFilePath(context, src_url, &src_file_path);
@@ -208,7 +209,9 @@ PlatformFileError LocalFileUtil::CopyOrMoveFile(
if (error != base::PLATFORM_FILE_OK)
return error;
- return NativeFileUtil::CopyOrMoveFile(src_file_path, dest_file_path, copy);
+ return NativeFileUtil::CopyOrMoveFile(
+ src_file_path, dest_file_path, option,
+ fileapi::NativeFileUtil::CopyOrMoveModeForDestination(dest_url, copy));
}
PlatformFileError LocalFileUtil::CopyInForeignFile(
@@ -223,7 +226,10 @@ PlatformFileError LocalFileUtil::CopyInForeignFile(
GetLocalFilePath(context, dest_url, &dest_file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
- return NativeFileUtil::CopyOrMoveFile(src_file_path, dest_file_path, true);
+ return NativeFileUtil::CopyOrMoveFile(
+ src_file_path, dest_file_path, FileSystemOperation::OPTION_NONE,
+ fileapi::NativeFileUtil::CopyOrMoveModeForDestination(dest_url,
+ true /* copy */));
}
PlatformFileError LocalFileUtil::DeleteFile(