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

Unified Diff: base/test/test_file_util_posix.cc

Issue 13196006: Move path functions from file_util to FilePath object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try 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
Index: base/test/test_file_util_posix.cc
diff --git a/base/test/test_file_util_posix.cc b/base/test/test_file_util_posix.cc
index 6be1c82e39d27a6f0d07f1e9eef3504d433253af..731d9761e01930a7c8b3cb157d9c9363992113b6 100644
--- a/base/test/test_file_util_posix.cc
+++ b/base/test/test_file_util_posix.cc
@@ -17,6 +17,8 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+using base::MakeAbsoluteFilePath;
+
namespace file_util {
namespace {
@@ -90,11 +92,12 @@ bool CopyRecursiveDirNoCache(const base::FilePath& source_dir,
// This function does not properly handle destinations within the source
base::FilePath real_to_path = dest_dir;
if (PathExists(real_to_path)) {
- if (!AbsolutePath(&real_to_path))
+ real_to_path = MakeAbsoluteFilePath(real_to_path);
+ if (real_to_path.empty())
return false;
} else {
- real_to_path = real_to_path.DirName();
- if (!AbsolutePath(&real_to_path))
+ real_to_path = MakeAbsoluteFilePath(real_to_path.DirName());
+ if (real_to_path.empty())
return false;
}
if (real_to_path.value().compare(0, source_dir.value().size(),

Powered by Google App Engine
This is Rietveld 408576698