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

Unified Diff: webkit/fileapi/fileapi_file_util.h

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: Fixed for ChromeOS again. Created 9 years, 4 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/fileapi_file_util.h
diff --git a/webkit/fileapi/file_system_file_util.h b/webkit/fileapi/fileapi_file_util.h
similarity index 93%
rename from webkit/fileapi/file_system_file_util.h
rename to webkit/fileapi/fileapi_file_util.h
index 8a46fbdb6d5974369ce2d8e7b12bc76663879425..f71421db5731462a19ccc8d9556e8d38d64d0d9b 100644
--- a/webkit/fileapi/file_system_file_util.h
+++ b/webkit/fileapi/fileapi_file_util.h
@@ -2,21 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
-#define WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
+#ifndef WEBKIT_FILEAPI_FILE_UTIL_H_
+#define WEBKIT_FILEAPI_FILE_UTIL_H_
-#include "base/callback.h"
#include "base/file_path.h"
-#include "base/file_util.h"
#include "base/file_util_proxy.h"
-#include "base/memory/ref_counted.h"
#include "base/platform_file.h"
-#include "base/tracked_objects.h"
-#include "webkit/fileapi/file_system_types.h"
namespace base {
-struct PlatformFileInfo;
-class MessageLoopProxy;
class Time;
}
@@ -44,10 +37,11 @@ class FileSystemOperationContext;
// meta logic by using other virtual methods.
// (*2) All non-virtual methods: Copy, Move, Delete, DeleteDirectoryRecursive,
// PerformCommonCheckAndPreparationForMoveAndCopy and CopyOrMoveDirectory.
-class FileSystemFileUtil {
+class FileApiFileUtil {
public:
- FileSystemFileUtil() {}
- virtual ~FileSystemFileUtil() {}
+ FileApiFileUtil();
+ explicit FileApiFileUtil(FileApiFileUtil* underlying_file_util);
+ virtual ~FileApiFileUtil();
// Creates or opens a file with the given flags. It is invalid to pass NULL
// for the callback.
@@ -118,7 +112,7 @@ class FileSystemFileUtil {
// Copies in a single file from a different filesystem. The src_file_path is
// a true local platform path, regardless of which subclass of
- // FileSystemFileUtil is being invoked.
+ // FileApiFileUtil is being invoked.
virtual PlatformFileError CopyInForeignFile(
FileSystemOperationContext* context,
const FilePath& src_file_path,
@@ -231,9 +225,9 @@ class FileSystemFileUtil {
};
// Returns a pointer to a new instance of AbstractFileEnumerator which is
- // implemented for each FileUtil subclass. The instance needs to be freed
- // by the caller, and its lifetime should not extend past when the current
- // call returns to the main FILE message loop.
+ // implemented for each FileApiFileUtil subclass. The instance needs to be
+ // freed by the caller, and its lifetime should not extend past when the
+ // current call returns to the main FILE message loop.
virtual AbstractFileEnumerator* CreateFileEnumerator(
FileSystemOperationContext* unused,
const FilePath& root_path);
@@ -278,9 +272,16 @@ class FileSystemFileUtil {
const FilePath& dest_file_path,
bool copy);
- DISALLOW_COPY_AND_ASSIGN(FileSystemFileUtil);
+ FileApiFileUtil* underlying_file_util() const {
+ return underlying_file_util_.get();
+ }
+
+ private:
+ scoped_ptr<FileApiFileUtil> underlying_file_util_;
+
+ DISALLOW_COPY_AND_ASSIGN(FileApiFileUtil);
};
} // namespace fileapi
-#endif // WEBKIT_FILEAPI_FILE_SYSTEM_FILE_UTIL_H_
+#endif // WEBKIT_FILEAPI_FILE_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698