summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 20:34:02 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-01 20:34:02 +0000
commit399b870529860ccbf7e2743291edc3aaeb089ca3 (patch)
tree4f64211f2f1d69dc5979906cbe8bde08f898caf1 /net/disk_cache
parent982e781d80d395cd9749de92d2efd6a309168cd3 (diff)
downloadchromium_src-399b870529860ccbf7e2743291edc3aaeb089ca3.zip
chromium_src-399b870529860ccbf7e2743291edc3aaeb089ca3.tar.gz
chromium_src-399b870529860ccbf7e2743291edc3aaeb089ca3.tar.bz2
Deprecate wstring version of PathService::Get() in net.
Review URL: http://codereview.chromium.org/100240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/backend_unittest.cc12
-rw-r--r--net/disk_cache/disk_cache_test_util.cc6
-rw-r--r--net/disk_cache/stress_cache.cc5
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;