diff options
Diffstat (limited to 'net/disk_cache')
-rw-r--r-- | net/disk_cache/backend_unittest.cc | 12 | ||||
-rw-r--r-- | net/disk_cache/disk_cache_test_util.cc | 6 | ||||
-rw-r--r-- | net/disk_cache/stress_cache.cc | 5 |
3 files changed, 12 insertions, 11 deletions
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc index 1722ad5..dd33d28 100644 --- a/net/disk_cache/backend_unittest.cc +++ b/net/disk_cache/backend_unittest.cc @@ -21,17 +21,17 @@ namespace { // Copies a set of cache files from the data folder to the test folder. bool CopyTestCache(const std::wstring& name) { - std::wstring path; + FilePath path; PathService::Get(base::DIR_SOURCE_ROOT, &path); - file_util::AppendToPath(&path, L"net"); - file_util::AppendToPath(&path, L"data"); - file_util::AppendToPath(&path, L"cache_tests"); - file_util::AppendToPath(&path, name); + path = path.AppendASCII("net"); + path = path.AppendASCII("data"); + path = path.AppendASCII("cache_tests"); + path = path.Append(FilePath::FromWStringHack(name)); std::wstring dest = GetCachePath(); if (!DeleteCache(dest.c_str())) return false; - return file_util::CopyDirectory(path, dest, false); + return file_util::CopyDirectory(path, FilePath::FromWStringHack(dest), false); } } // namespace diff --git a/net/disk_cache/disk_cache_test_util.cc b/net/disk_cache/disk_cache_test_util.cc index 013c27a..99c4500 100644 --- a/net/disk_cache/disk_cache_test_util.cc +++ b/net/disk_cache/disk_cache_test_util.cc @@ -17,13 +17,13 @@ using base::TimeDelta; namespace { std::wstring BuildCachePath(const std::wstring& name) { - std::wstring path; + FilePath path; PathService::Get(base::DIR_TEMP, &path); - file_util::AppendToPath(&path, name); + path = path.Append(FilePath::FromWStringHack(name)); if (!file_util::PathExists(path)) file_util::CreateDirectory(path); - return path; + return path.ToWStringHack(); } } // namespace. diff --git a/net/disk_cache/stress_cache.cc b/net/disk_cache/stress_cache.cc index bf12d30..b2b60e4 100644 --- a/net/disk_cache/stress_cache.cc +++ b/net/disk_cache/stress_cache.cc @@ -16,6 +16,7 @@ #include "base/at_exit.h" #include "base/command_line.h" #include "base/debug_util.h" +#include "base/file_path.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/path_service.h" @@ -34,10 +35,10 @@ const int kExpectedCrash = 100; // Starts a new process. int RunSlave(int iteration) { - std::wstring exe; + FilePath exe; PathService::Get(base::FILE_EXE, &exe); - CommandLine cmdline(exe); + CommandLine cmdline(exe.ToWStringHack()); cmdline.AppendLooseValue(ASCIIToWide(IntToString(iteration))); base::ProcessHandle handle; |