diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 23:02:37 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 23:02:37 +0000 |
commit | 4317c71c37dab54c55788bb68f56acf9273410c5 (patch) | |
tree | e0a4d13fb86c89a732783f6b5c4fad9b868f86b5 /net/disk_cache/storage_block_unittest.cc | |
parent | ba4c78e5b07788094ec02c6a1b44eebd7a727926 (diff) | |
download | chromium_src-4317c71c37dab54c55788bb68f56acf9273410c5.zip chromium_src-4317c71c37dab54c55788bb68f56acf9273410c5.tar.gz chromium_src-4317c71c37dab54c55788bb68f56acf9273410c5.tar.bz2 |
Move disk_cache::MappedFile to use FilePath instead of wstring.
Also add some FilePath methods in disk_cache_util.h and obsolete
the old.
BUG=24444
Review URL: http://codereview.chromium.org/266069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/storage_block_unittest.cc')
-rw-r--r-- | net/disk_cache/storage_block_unittest.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/disk_cache/storage_block_unittest.cc b/net/disk_cache/storage_block_unittest.cc index 8543e3d..c9406b6 100644 --- a/net/disk_cache/storage_block_unittest.cc +++ b/net/disk_cache/storage_block_unittest.cc @@ -10,10 +10,9 @@ #include "testing/gtest/include/gtest/gtest.h" TEST_F(DiskCacheTest, StorageBlock_LoadStore) { - std::wstring filename = GetCachePath(); - file_util::AppendToPath(&filename, L"a_test"); + FilePath filename = GetCacheFilePath().AppendASCII("a_test"); scoped_refptr<disk_cache::MappedFile> file(new disk_cache::MappedFile); - ASSERT_TRUE(CreateCacheTestFile(filename.c_str())); + ASSERT_TRUE(CreateCacheTestFile(filename)); ASSERT_TRUE(file->Init(filename, 8192)); disk_cache::CacheEntryBlock entry1(file, disk_cache::Addr(0xa0010001)); @@ -31,10 +30,9 @@ TEST_F(DiskCacheTest, StorageBlock_LoadStore) { } TEST_F(DiskCacheTest, StorageBlock_SetData) { - std::wstring filename = GetCachePath(); - file_util::AppendToPath(&filename, L"a_test"); + FilePath filename = GetCacheFilePath().AppendASCII("a_test"); scoped_refptr<disk_cache::MappedFile> file(new disk_cache::MappedFile); - ASSERT_TRUE(CreateCacheTestFile(filename.c_str())); + ASSERT_TRUE(CreateCacheTestFile(filename)); ASSERT_TRUE(file->Init(filename, 8192)); disk_cache::CacheEntryBlock entry1(file, disk_cache::Addr(0xa0010001)); @@ -52,10 +50,9 @@ TEST_F(DiskCacheTest, StorageBlock_SetData) { } TEST_F(DiskCacheTest, StorageBlock_SetModified) { - std::wstring filename = GetCachePath(); - file_util::AppendToPath(&filename, L"a_test"); + FilePath filename = GetCacheFilePath().AppendASCII("a_test"); scoped_refptr<disk_cache::MappedFile> file(new disk_cache::MappedFile); - ASSERT_TRUE(CreateCacheTestFile(filename.c_str())); + ASSERT_TRUE(CreateCacheTestFile(filename)); ASSERT_TRUE(file->Init(filename, 8192)); disk_cache::CacheEntryBlock* entry1 = |