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

Unified Diff: webkit/fileapi/local_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/isolated_file_util_unittest.cc ('k') | webkit/fileapi/native_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/local_file_util.cc
diff --git a/webkit/fileapi/local_file_util.cc b/webkit/fileapi/local_file_util.cc
index 47604238139e1aacae2480486369bb5f633ca5a6..645856c4300a6ef48ab5f0bb3dc83b79cd44ce86 100644
--- a/webkit/fileapi/local_file_util.cc
+++ b/webkit/fileapi/local_file_util.cc
@@ -4,6 +4,7 @@
#include "webkit/fileapi/local_file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_util_proxy.h"
#include "googleurl/src/gurl.h"
#include "webkit/fileapi/file_system_context.h"
@@ -39,8 +40,8 @@ class LocalFileEnumerator : 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 platform_root_path_;
base::FilePath virtual_root_path_;
};
@@ -52,7 +53,7 @@ base::FilePath LocalFileEnumerator::Next() {
next = file_enum_.Next();
if (next.empty())
return next;
- file_enum_.GetFindInfo(&file_util_info_);
+ file_util_info_ = file_enum_.GetInfo();
base::FilePath path;
platform_root_path_.AppendRelativePath(next, &path);
@@ -60,15 +61,15 @@ base::FilePath LocalFileEnumerator::Next() {
}
int64 LocalFileEnumerator::Size() {
- return file_util::FileEnumerator::GetFilesize(file_util_info_);
+ return file_util_info_.GetSize();
}
base::Time LocalFileEnumerator::LastModifiedTime() {
- return file_util::FileEnumerator::GetLastModifiedTime(file_util_info_);
+ return file_util_info_.GetLastModifiedTime();
}
bool LocalFileEnumerator::IsDirectory() {
- return file_util::FileEnumerator::IsDirectory(file_util_info_);
+ return file_util_info_.IsDirectory();
}
LocalFileUtil::LocalFileUtil() {
@@ -151,8 +152,7 @@ scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> LocalFileUtil::
}
return make_scoped_ptr(new LocalFileEnumerator(
file_path, root_url.path(),
- file_util::FileEnumerator::FILES |
- file_util::FileEnumerator::DIRECTORIES))
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES))
.PassAs<FileSystemFileUtil::AbstractFileEnumerator>();
}
« no previous file with comments | « webkit/fileapi/isolated_file_util_unittest.cc ('k') | webkit/fileapi/native_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698