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

Unified Diff: webkit/fileapi/overlay_file_util.cc

Issue 7470037: [Refactor] to rename and re-layer the file_util stack layers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased. Created 9 years, 5 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
Index: webkit/fileapi/overlay_file_util.cc
diff --git a/webkit/fileapi/overlay_file_util.cc b/webkit/fileapi/overlay_file_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..718d1882fc1cf27386a487784615b645ed7335e7
--- /dev/null
+++ b/webkit/fileapi/overlay_file_util.cc
@@ -0,0 +1,143 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/fileapi/overlay_file_util.h"
+
+#include <vector>
+
+#include "webkit/fileapi/file_system_operation_context.h"
+
+namespace fileapi {
+
+OverlayFileUtil::OverlayFileUtil(FileUtil* underlying_file_util)
+ : underlying_file_util_(underlying_file_util) {
+}
+
+OverlayFileUtil::~OverlayFileUtil() {
+}
+
+PlatformFileError OverlayFileUtil::CreateOrOpen(
+ FileSystemOperationContext* context,
+ const FilePath& file_path, int file_flags,
+ PlatformFile* file_handle, bool* created) {
+ return underlying_file_util_->CreateOrOpen(
+ context, file_path, file_flags, file_handle, created);
+}
+
+PlatformFileError OverlayFileUtil::Close(
+ FileSystemOperationContext* context,
+ PlatformFile file_handle) {
+ return underlying_file_util_->Close(context, file_handle);
+}
+
+PlatformFileError OverlayFileUtil::EnsureFileExists(
+ FileSystemOperationContext* context,
+ const FilePath& file_path,
+ bool* created) {
+ return underlying_file_util_->EnsureFileExists(context, file_path, created);
+}
+
+PlatformFileError OverlayFileUtil::GetLocalFilePath(
+ FileSystemOperationContext* context,
+ const FilePath& virtual_path,
+ FilePath* local_path) {
+ return underlying_file_util_->GetLocalFilePath(
+ context, virtual_path, local_path);
+}
+
+PlatformFileError OverlayFileUtil::GetFileInfo(
+ FileSystemOperationContext* context,
+ const FilePath& file_path,
+ base::PlatformFileInfo* file_info,
+ FilePath* platform_file_path) {
+ return underlying_file_util_->GetFileInfo(
+ context, file_path, file_info, platform_file_path);
+}
+
+PlatformFileError OverlayFileUtil::ReadDirectory(
+ FileSystemOperationContext* context,
+ const FilePath& file_path,
+ std::vector<base::FileUtilProxy::Entry>* entries) {
+ return underlying_file_util_->ReadDirectory(context, file_path, entries);
+}
+
+PlatformFileError OverlayFileUtil::CreateDirectory(
+ FileSystemOperationContext* context,
+ const FilePath& file_path,
+ bool exclusive,
+ bool recursive) {
+ return underlying_file_util_->CreateDirectory(
+ context, file_path, exclusive, recursive);
+}
+
+PlatformFileError OverlayFileUtil::Touch(
+ FileSystemOperationContext* context,
+ const FilePath& file_path,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time) {
+ return underlying_file_util_->Touch(
+ context, file_path, last_access_time, last_modified_time);
+}
+
+PlatformFileError OverlayFileUtil::Truncate(
+ FileSystemOperationContext* context,
+ const FilePath& file_path,
+ int64 length) {
+ return underlying_file_util_->Truncate(context, file_path, length);
+}
+
+PlatformFileError OverlayFileUtil::CopyOrMoveFile(
+ FileSystemOperationContext* context,
+ const FilePath& src_file_path,
+ const FilePath& dest_file_path,
+ bool copy) {
+ return underlying_file_util_->CopyOrMoveFile(
+ context, src_file_path, dest_file_path, copy);
+}
+
+PlatformFileError OverlayFileUtil::CopyInForeignFile(
+ FileSystemOperationContext* context,
+ const FilePath& src_file_path,
+ const FilePath& dest_file_path) {
+ return underlying_file_util_->CopyInForeignFile(
+ context, src_file_path, dest_file_path);
+}
+
+PlatformFileError OverlayFileUtil::DeleteFile(
+ FileSystemOperationContext* context,
+ const FilePath& file_path) {
+ return underlying_file_util_->DeleteFile(context, file_path);
+}
+
+PlatformFileError OverlayFileUtil::DeleteSingleDirectory(
+ FileSystemOperationContext* context,
+ const FilePath& file_path) {
+ return underlying_file_util_->DeleteSingleDirectory(context, file_path);
+}
+
+bool OverlayFileUtil::PathExists(
+ FileSystemOperationContext* context,
+ const FilePath& file_path) {
+ return underlying_file_util_->PathExists(context, file_path);
+}
+
+bool OverlayFileUtil::DirectoryExists(
+ FileSystemOperationContext* context,
+ const FilePath& file_path) {
+ return underlying_file_util_->DirectoryExists(context, file_path);
+}
+
+bool OverlayFileUtil::IsDirectoryEmpty(
+ FileSystemOperationContext* context,
+ const FilePath& file_path) {
+ return underlying_file_util_->IsDirectoryEmpty(context, file_path);
+}
+
+FileUtil::AbstractFileEnumerator* OverlayFileUtil::CreateFileEnumerator(
+ FileSystemOperationContext* context,
+ const FilePath& root_path) {
+ return underlying_file_util_->CreateFileEnumerator(context, root_path);
+}
+
+} // namespace fileapi

Powered by Google App Engine
This is Rietveld 408576698