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

Unified Diff: webkit/fileapi/file_system_directory_database.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/file_system_database_test_helper.cc ('k') | webkit/fileapi/file_system_origin_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_directory_database.cc
diff --git a/webkit/fileapi/file_system_directory_database.cc b/webkit/fileapi/file_system_directory_database.cc
index 95bd88f78762650cc64fc6a6959198313c1e1d0c..8ee3ada319ca097a0364accbb3777daa81f52638 100644
--- a/webkit/fileapi/file_system_directory_database.cc
+++ b/webkit/fileapi/file_system_directory_database.cc
@@ -10,6 +10,7 @@
#include <stack>
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/location.h"
#include "base/metrics/histogram.h"
#include "base/pickle.h"
@@ -281,17 +282,13 @@ bool DatabaseCheckHelper::ScanDirectory() {
base::FilePath dir_path = pending_directories.top();
pending_directories.pop();
- file_util::FileEnumerator file_enum(
+ base::FileEnumerator file_enum(
dir_path.empty() ? path_ : path_.Append(dir_path),
false /* not recursive */,
- file_util::FileEnumerator::DIRECTORIES |
- file_util::FileEnumerator::FILES);
+ base::FileEnumerator::DIRECTORIES | base::FileEnumerator::FILES);
base::FilePath absolute_file_path;
while (!(absolute_file_path = file_enum.Next()).empty()) {
- file_util::FileEnumerator::FindInfo find_info;
- file_enum.GetFindInfo(&find_info);
-
base::FilePath relative_file_path;
if (!path_.AppendRelativePath(absolute_file_path, &relative_file_path))
return false;
@@ -300,7 +297,7 @@ bool DatabaseCheckHelper::ScanDirectory() {
relative_file_path) != kExcludes + arraysize(kExcludes))
continue;
- if (file_util::FileEnumerator::IsDirectory(find_info)) {
+ if (file_enum.GetInfo().IsDirectory()) {
pending_directories.push(relative_file_path);
continue;
}
« no previous file with comments | « webkit/fileapi/file_system_database_test_helper.cc ('k') | webkit/fileapi/file_system_origin_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698