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

Unified Diff: net/base/directory_lister_unittest.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 | « net/base/directory_lister.cc ('k') | net/disk_cache/block_files_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/directory_lister_unittest.cc
diff --git a/net/base/directory_lister_unittest.cc b/net/base/directory_lister_unittest.cc
index b088c8edfbf6df97a00494a0b329db0eafef7089..bc4cb3abdae3d2979c4f1831e41219b61340f83b 100644
--- a/net/base/directory_lister_unittest.cc
+++ b/net/base/directory_lister_unittest.cc
@@ -5,6 +5,7 @@
#include <list>
#include <utility>
+#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/i18n/file_util_icu.h"
@@ -63,18 +64,17 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
current < file_list_.size();
previous++, current++) {
// Directories should come before files.
- if (file_util::FileEnumerator::IsDirectory(file_list_[previous]) &&
- !file_util::FileEnumerator::IsDirectory(file_list_[current])) {
+ if (file_list_[previous].IsDirectory() &&
+ !file_list_[current].IsDirectory()) {
continue;
}
EXPECT_NE(FILE_PATH_LITERAL(".."),
- file_util::FileEnumerator::GetFilename(
- file_list_[current]).BaseName().value());
- EXPECT_EQ(file_util::FileEnumerator::IsDirectory(file_list_[previous]),
- file_util::FileEnumerator::IsDirectory(file_list_[current]));
+ file_list_[current].GetName().BaseName().value());
+ EXPECT_EQ(file_list_[previous].IsDirectory(),
+ file_list_[current].IsDirectory());
EXPECT_TRUE(file_util::LocaleAwareCompareFilenames(
- file_util::FileEnumerator::GetFilename(file_list_[previous]),
- file_util::FileEnumerator::GetFilename(file_list_[current])));
+ file_list_[previous].GetName(),
+ file_list_[current].GetName()));
}
}
}
@@ -87,7 +87,7 @@ class ListerDelegate : public DirectoryLister::DirectoryListerDelegate {
int error_;
bool recursive_;
bool quit_loop_after_each_file_;
- std::vector<file_util::FileEnumerator::FindInfo> file_list_;
+ std::vector<base::FileEnumerator::FileInfo> file_list_;
std::vector<base::FilePath> paths_;
};
« no previous file with comments | « net/base/directory_lister.cc ('k') | net/disk_cache/block_files_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698