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

Unified Diff: webkit/fileapi/cross_file_util_helper.h

Issue 9616033: Merge CrossFileUtilHelper to FileUtilHelper as Copy() and Move(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 | « no previous file | webkit/fileapi/cross_file_util_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/cross_file_util_helper.h
diff --git a/webkit/fileapi/cross_file_util_helper.h b/webkit/fileapi/cross_file_util_helper.h
deleted file mode 100644
index 3466928fda1a0c92a1c605ea058cf3463a6ac1f5..0000000000000000000000000000000000000000
--- a/webkit/fileapi/cross_file_util_helper.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef WEBKIT_FILEAPI_CROSS_FILE_UTIL_HELPER_H_
-#define WEBKIT_FILEAPI_CROSS_FILE_UTIL_HELPER_H_
-
-#include "base/callback.h"
-#include "base/platform_file.h"
-
-namespace fileapi {
-
-class FileSystemFileUtil;
-class FileSystemOperationContext;
-class FileSystemPath;
-
-// A helper class for cross-FileUtil Copy/Move operations.
-class CrossFileUtilHelper {
- public:
- enum Operation {
- OPERATION_COPY,
- OPERATION_MOVE
- };
-
- CrossFileUtilHelper(FileSystemOperationContext* context,
- FileSystemFileUtil* src_util,
- FileSystemFileUtil* dest_util,
- const FileSystemPath& src_path,
- const FileSystemPath& dest_path,
- Operation operation);
- ~CrossFileUtilHelper();
-
- base::PlatformFileError DoWork();
-
- private:
- // Performs common pre-operation check and preparation.
- // This may delete the destination directory if it's empty.
- base::PlatformFileError PerformErrorCheckAndPreparationForMoveAndCopy();
-
- // This assumes that the root exists.
- bool ParentExists(const FileSystemPath& path, FileSystemFileUtil* file_util);
-
- // Performs recursive copy or move by calling CopyOrMoveFile for individual
- // files. Operations for recursive traversal are encapsulated in this method.
- // It assumes src_path and dest_path have passed
- // PerformErrorCheckAndPreparationForMoveAndCopy().
- base::PlatformFileError CopyOrMoveDirectory(
- const FileSystemPath& src_path,
- const FileSystemPath& dest_path);
-
- // Determines whether a simple same-filesystem move or copy can be done. If
- // so, it delegates to CopyOrMoveFile. Otherwise it looks up the true
- // platform path of the source file, delegates to CopyInForeignFile, and [for
- // move] calls DeleteFile on the source file.
- base::PlatformFileError CopyOrMoveFile(
- const FileSystemPath& src_path,
- const FileSystemPath& dest_path);
-
- FileSystemOperationContext* context_;
- FileSystemFileUtil* src_util_; // Not owned.
- FileSystemFileUtil* dest_util_; // Not owned.
- const FileSystemPath& src_root_path_;
- const FileSystemPath& dest_root_path_;
- Operation operation_;
-
- DISALLOW_COPY_AND_ASSIGN(CrossFileUtilHelper);
-};
-
-} // namespace fileapi
-
-#endif // WEBKIT_FILEAPI_CROSS_FILE_UTIL_HELPER_H_
« no previous file with comments | « no previous file | webkit/fileapi/cross_file_util_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698