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

Unified Diff: chrome/test/automation/proxy_launcher.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 | « chrome/installer/util/shell_util_unittest.cc ('k') | chrome/test/chromedriver/chrome/zip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/proxy_launcher.cc
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
index 8a932b5ca235646c26c84fe12df5e0439966a3a9..9619cedb442db287b26017eb517fc6e801d672db 100644
--- a/chrome/test/automation/proxy_launcher.cc
+++ b/chrome/test/automation/proxy_launcher.cc
@@ -8,6 +8,7 @@
#include "base/environment.h"
#include "base/file_util.h"
+#include "base/files/file_enumerator.h"
#include "base/stringprintf.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
@@ -49,13 +50,11 @@ const char kUITestType[] = "ui";
// startup tests other than the "cold" ones run more slowly than necessary.
bool CopyDirectoryContentsNoCache(const base::FilePath& source,
const base::FilePath& dest) {
- file_util::FileEnumerator en(source, false,
- file_util::FileEnumerator::FILES |
- file_util::FileEnumerator::DIRECTORIES);
+ base::FileEnumerator en(source, false,
+ base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES);
for (base::FilePath cur = en.Next(); !cur.empty(); cur = en.Next()) {
- file_util::FileEnumerator::FindInfo info;
- en.GetFindInfo(&info);
- if (file_util::FileEnumerator::IsDirectory(info)) {
+ base::FileEnumerator::FileInfo info = en.GetInfo();
+ if (info.IsDirectory()) {
if (!file_util::CopyDirectory(cur, dest, true))
return false;
} else {
@@ -67,8 +66,7 @@ bool CopyDirectoryContentsNoCache(const base::FilePath& source,
// Kick out the profile files, this must happen after SetUp which creates the
// profile. It might be nicer to use EvictFileFromSystemCacheWrapper from
// UITest which will retry on failure.
- file_util::FileEnumerator kickout(dest, true,
- file_util::FileEnumerator::FILES);
+ base::FileEnumerator kickout(dest, true, base::FileEnumerator::FILES);
for (base::FilePath cur = kickout.Next(); !cur.empty(); cur = kickout.Next())
base::EvictFileFromSystemCacheWithRetry(cur);
return true;
« no previous file with comments | « chrome/installer/util/shell_util_unittest.cc ('k') | chrome/test/chromedriver/chrome/zip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698