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

Unified Diff: webkit/fileapi/native_file_util.h

Issue 12051010: (For-try) Divide recursive Copy/Move into multiple async tasks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 7 years, 11 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/native_file_util.h
diff --git a/webkit/fileapi/native_file_util.h b/webkit/fileapi/native_file_util.h
index ff288e50d13aac3787689b40a332c1430803173c..f0e1329adc02dfb6ca198abd72da67e379253621 100644
--- a/webkit/fileapi/native_file_util.h
+++ b/webkit/fileapi/native_file_util.h
@@ -18,8 +18,18 @@ class Time;
namespace fileapi {
+// A thin wrapper class for accessing the OS native filesystem.
+// This performs common error checks necessary to implement FileUtil family
+// in addition to perform native filesystem operations.
+//
+// For the error checks it performs please see the comment for
+// FileSystemFileUtil interface (webkit/fileapi/file_system_file_util.h).
+//
+// Note that all the methods of this class are static and this does NOT
+// inherit from FileSystemFileUtil.
+//
// TODO(dmikurube): Add unit tests for NativeFileUtil.
-// This class handles accessing the OS native filesystem.
+// http://crbug.com/170564
class WEBKIT_STORAGE_EXPORT_PRIVATE NativeFileUtil {
public:
static base::PlatformFileError CreateOrOpen(
@@ -44,12 +54,11 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE NativeFileUtil {
static base::PlatformFileError Truncate(const FilePath& path, int64 length);
static bool PathExists(const FilePath& path);
static bool DirectoryExists(const FilePath& path);
- static bool IsDirectoryEmpty(const FilePath& path);
static base::PlatformFileError CopyOrMoveFile(const FilePath& src_path,
const FilePath& dest_path,
bool copy);
static base::PlatformFileError DeleteFile(const FilePath& path);
- static base::PlatformFileError DeleteSingleDirectory(const FilePath& path);
+ static base::PlatformFileError DeleteDirectory(const FilePath& path);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil);

Powered by Google App Engine
This is Rietveld 408576698