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

Unified Diff: webkit/browser/fileapi/isolated_file_util_unittest.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
« no previous file with comments | « webkit/browser/dom_storage/dom_storage_context.cc ('k') | webkit/browser/fileapi/local_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/fileapi/isolated_file_util_unittest.cc
diff --git a/webkit/browser/fileapi/isolated_file_util_unittest.cc b/webkit/browser/fileapi/isolated_file_util_unittest.cc
index dfedabd772cf32786bf33680228a72651d25ef75..cd07bc99b0e906264b672552e50af796d4855b98 100644
--- a/webkit/browser/fileapi/isolated_file_util_unittest.cc
+++ b/webkit/browser/fileapi/isolated_file_util_unittest.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -27,8 +28,6 @@
#include "webkit/browser/fileapi/native_file_util.h"
#include "webkit/browser/fileapi/test_file_set.h"
-using file_util::FileEnumerator;
-
namespace fileapi {
namespace {
@@ -363,18 +362,17 @@ TEST_F(IsolatedFileUtilTest, ReadDirectoryTest) {
EntryMap expected_entry_map;
base::FilePath dir_path = GetTestCasePlatformPath(test_case.path);
- FileEnumerator file_enum(
+ base::FileEnumerator file_enum(
dir_path, false /* not recursive */,
- FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES);
base::FilePath current;
while (!(current = file_enum.Next()).empty()) {
- FileEnumerator::FindInfo file_info;
- file_enum.GetFindInfo(&file_info);
+ base::FileEnumerator::FileInfo file_info = file_enum.GetInfo();
DirectoryEntry entry;
- entry.is_directory = FileEnumerator::IsDirectory(file_info);
+ entry.is_directory = file_info.IsDirectory();
entry.name = current.BaseName().value();
- entry.size = FileEnumerator::GetFilesize(file_info);
- entry.last_modified_time = FileEnumerator::GetLastModifiedTime(file_info);
+ entry.size = file_info.GetSize();
+ entry.last_modified_time = file_info.GetLastModifiedTime();
expected_entry_map[entry.name] = entry;
#if defined(OS_POSIX)
« no previous file with comments | « webkit/browser/dom_storage/dom_storage_context.cc ('k') | webkit/browser/fileapi/local_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698