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

Unified Diff: content/browser/storage_partition_impl_map.cc

Issue 16392011: Move FileEnumerator to its own file, do some refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix incorrect includes Created 7 years, 6 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: content/browser/storage_partition_impl_map.cc
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index eae8422ccf34ea9b700d079623c080888d499b9e..e84fcec3c33f84ddd7429681186045f8d161e913 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/stl_util.h"
#include "base/string_number_conversions.h"
@@ -182,12 +183,12 @@ const int kPartitionNameHashBytes = 6;
// Needed for selecting all files in ObliterateOneDirectory() below.
#if defined(OS_POSIX)
-const int kAllFileTypes = file_util::FileEnumerator::FILES |
- file_util::FileEnumerator::DIRECTORIES |
- file_util::FileEnumerator::SHOW_SYM_LINKS;
+const int kAllFileTypes = base::FileEnumerator::FILES |
+ base::FileEnumerator::DIRECTORIES |
+ base::FileEnumerator::SHOW_SYM_LINKS;
#else
-const int kAllFileTypes = file_util::FileEnumerator::FILES |
- file_util::FileEnumerator::DIRECTORIES;
+const int kAllFileTypes = base::FileEnumerator::FILES |
+ base::FileEnumerator::DIRECTORIES;
#endif
base::FilePath GetStoragePartitionDomainPath(
@@ -208,7 +209,7 @@ void ObliterateOneDirectory(const base::FilePath& current_dir,
std::vector<base::FilePath>* paths_to_consider) {
CHECK(current_dir.IsAbsolute());
- file_util::FileEnumerator enumerator(current_dir, false, kAllFileTypes);
+ base::FileEnumerator enumerator(current_dir, false, kAllFileTypes);
for (base::FilePath to_delete = enumerator.Next(); !to_delete.empty();
to_delete = enumerator.Next()) {
// Enum tracking which of the 3 possible actions to take for |to_delete|.
@@ -322,7 +323,7 @@ void BlockingGarbageCollect(
scoped_ptr<base::hash_set<base::FilePath> > active_paths) {
CHECK(storage_root.IsAbsolute());
- file_util::FileEnumerator enumerator(storage_root, false, kAllFileTypes);
+ base::FileEnumerator enumerator(storage_root, false, kAllFileTypes);
base::FilePath trash_directory;
if (!file_util::CreateTemporaryDirInDir(storage_root, kTrashDirname,
&trash_directory)) {

Powered by Google App Engine
This is Rietveld 408576698