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

Unified Diff: trunk/src/chrome/test/automation/proxy_launcher.cc

Issue 13958002: Revert 192940 "Delete CopyRecursiveDirNoCache from test_file_util." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 | « trunk/src/base/test/test_file_util_win.cc ('k') | trunk/src/chrome/test/perf/startup_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/test/automation/proxy_launcher.cc
===================================================================
--- trunk/src/chrome/test/automation/proxy_launcher.cc (revision 193252)
+++ trunk/src/chrome/test/automation/proxy_launcher.cc (working copy)
@@ -39,29 +39,6 @@
// Passed as value of kTestType.
const char kUITestType[] = "ui";
-// Copies the contents of the given source directory to the given dest
-// directory. This is somewhat different than CopyDirectory in base which will
-// copies "source/" to "dest/source/". This version will copy "source/*" to
-// "dest/*", overwriting existing files as necessary.
-bool CopyDirectoryContents(const base::FilePath& source,
- const base::FilePath& dest) {
- file_util::FileEnumerator en(source, false,
- file_util::FileEnumerator::FILES |
- file_util::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)) {
- if (!file_util::CopyDirectory(cur, dest, true))
- return false;
- } else {
- if (!file_util::CopyFile(cur, dest.Append(cur.BaseName())))
- return false;
- }
- }
- return true;
-}
-
// We want to have a current history database when we start the browser so
// things like the NTP will have thumbnails. This method updates the dates
// in the history to be more recent.
@@ -209,7 +186,8 @@
if (!state.template_user_data.empty()) {
// Recursively copy the template directory to the user_data_dir.
- if (!CopyDirectoryContents(state.template_user_data, user_data_dir())) {
+ if (!file_util::CopyRecursiveDirNoCache(
+ state.template_user_data, user_data_dir())) {
LOG(ERROR) << "Failed to copy user data directory template.";
return false;
}
« no previous file with comments | « trunk/src/base/test/test_file_util_win.cc ('k') | trunk/src/chrome/test/perf/startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698