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

Unified Diff: chrome/browser/chromeos/drive/file_cache.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: chrome/browser/chromeos/drive/file_cache.cc
diff --git a/chrome/browser/chromeos/drive/file_cache.cc b/chrome/browser/chromeos/drive/file_cache.cc
index 8c43f71420061c2ff66dfeacf47d78830fa4fc65..d93e0dfe87b0e3418bf9dee3950f813f1368e1de 100644
--- a/chrome/browser/chromeos/drive/file_cache.cc
+++ b/chrome/browser/chromeos/drive/file_cache.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
@@ -61,10 +62,8 @@ bool InitCachePaths(const std::vector<base::FilePath>& cache_paths) {
// Do not remove recursively as we don't want to touch <gcache>/tmp/downloads,
// which is used for user initiated downloads like "Save As"
void RemoveAllFiles(const base::FilePath& directory) {
- using file_util::FileEnumerator;
-
- FileEnumerator enumerator(directory, false /* recursive */,
- FileEnumerator::FILES);
+ base::FileEnumerator enumerator(directory, false /* recursive */,
+ base::FileEnumerator::FILES);
for (base::FilePath file_path = enumerator.Next(); !file_path.empty();
file_path = enumerator.Next()) {
DVLOG(1) << "Removing " << file_path.value();
@@ -107,10 +106,10 @@ void DeleteFilesSelectively(const base::FilePath& path_to_delete_pattern,
// base name of |path_to_delete_pattern|.
// If a file is not |path_to_keep|, delete it.
bool success = true;
- file_util::FileEnumerator enumerator(
+ base::FileEnumerator enumerator(
path_to_delete_pattern.DirName(),
false, // not recursive
- file_util::FileEnumerator::FILES,
+ base::FileEnumerator::FILES,
path_to_delete_pattern.BaseName().value());
for (base::FilePath current = enumerator.Next(); !current.empty();
current = enumerator.Next()) {
« no previous file with comments | « chrome/browser/chromeos/contacts/contact_database_unittest.cc ('k') | chrome/browser/chromeos/drive/file_cache_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698