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

Unified Diff: webkit/fileapi/native_file_util.cc

Issue 13165005: Move FileEnumerator to its own file, do some refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge, fixes Created 7 years, 7 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 | « webkit/fileapi/local_file_util.cc ('k') | webkit/plugins/npapi/plugin_list_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/native_file_util.cc
diff --git a/webkit/fileapi/native_file_util.cc b/webkit/fileapi/native_file_util.cc
index e64fa052ecb8832349bfbec33c7d8631b9f9376c..d9b109f47c0cf8db6fdd88bec2fd414a0c817367 100644
--- a/webkit/fileapi/native_file_util.cc
+++ b/webkit/fileapi/native_file_util.cc
@@ -5,6 +5,7 @@
#include "webkit/fileapi/native_file_util.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/memory/scoped_ptr.h"
#include "webkit/fileapi/file_system_operation_context.h"
@@ -55,27 +56,27 @@ class NativeFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
virtual bool IsDirectory() OVERRIDE;
private:
- file_util::FileEnumerator file_enum_;
- file_util::FileEnumerator::FindInfo file_util_info_;
+ base::FileEnumerator file_enum_;
+ base::FileEnumerator::FileInfo file_util_info_;
};
base::FilePath NativeFileEnumerator::Next() {
base::FilePath rv = file_enum_.Next();
if (!rv.empty())
- file_enum_.GetFindInfo(&file_util_info_);
+ file_util_info_ = file_enum_.GetInfo();
return rv;
}
int64 NativeFileEnumerator::Size() {
- return file_util::FileEnumerator::GetFilesize(file_util_info_);
+ return file_util_info_.GetSize();
}
base::Time NativeFileEnumerator::LastModifiedTime() {
- return file_util::FileEnumerator::GetLastModifiedTime(file_util_info_);
+ return file_util_info_.GetLastModifiedTime();
}
bool NativeFileEnumerator::IsDirectory() {
- return file_util::FileEnumerator::IsDirectory(file_util_info_);
+ return file_util_info_.IsDirectory();
}
PlatformFileError NativeFileUtil::CreateOrOpen(
@@ -163,8 +164,7 @@ scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
bool recursive) {
return make_scoped_ptr(new NativeFileEnumerator(
root_path, recursive,
- file_util::FileEnumerator::FILES |
- file_util::FileEnumerator::DIRECTORIES))
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES))
.PassAs<FileSystemFileUtil::AbstractFileEnumerator>();
}
« no previous file with comments | « webkit/fileapi/local_file_util.cc ('k') | webkit/plugins/npapi/plugin_list_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698