diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 17:14:59 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 17:14:59 +0000 |
commit | cfaa1f2938c346d4801b895e7181f5de7d3755e6 (patch) | |
tree | 934967a90f94c5d50939929dd6ab38ad5dceed3e /net/tools | |
parent | 1ee19742db740fb60ed78266039f65c93c85c836 (diff) | |
download | chromium_src-cfaa1f2938c346d4801b895e7181f5de7d3755e6.zip chromium_src-cfaa1f2938c346d4801b895e7181f5de7d3755e6.tar.gz chromium_src-cfaa1f2938c346d4801b895e7181f5de7d3755e6.tar.bz2 |
Start migrating the disk cache to using FilePath.
This converts BackendImpl to using FilePath.
BUG=24444
Review URL: http://codereview.chromium.org/261045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28711 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r-- | net/tools/crash_cache/crash_cache.cc | 3 | ||||
-rw-r--r-- | net/tools/dump_cache/upgrade.cc | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc index 5272e17..36c64e2 100644 --- a/net/tools/crash_cache/crash_cache.cc +++ b/net/tools/crash_cache/crash_cache.cc @@ -214,7 +214,8 @@ int LoadOperations(const std::wstring& path, RankCrashes action) { DCHECK(action >= disk_cache::INSERT_LOAD_1); // Work with a tiny index table (16 entries) - disk_cache::BackendImpl* cache = new disk_cache::BackendImpl(path, 0xf); + disk_cache::BackendImpl* cache = + new disk_cache::BackendImpl(FilePath::FromWStringHack(path), 0xf); if (!cache || !cache->SetMaxSize(0x100000) || !cache->Init() || cache->GetEntryCount()) return GENERIC; diff --git a/net/tools/dump_cache/upgrade.cc b/net/tools/dump_cache/upgrade.cc index de0f878..566eb0b 100644 --- a/net/tools/dump_cache/upgrade.cc +++ b/net/tools/dump_cache/upgrade.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/file_path.h" #include "base/logging.h" #include "base/message_loop.h" #include "base/scoped_ptr.h" @@ -301,7 +302,7 @@ bool MasterSM::DoInit() { if (dump_to_disk_) { writer_ = new DiskDumper(path_); } else { - cache_.reset(new disk_cache::BackendImpl(path_)); + cache_.reset(new disk_cache::BackendImpl(FilePath::FromWStringHack(path_))); if (!cache_->Init()) { printf("Unable to initialize new files\n"); return false; @@ -509,7 +510,7 @@ class SlaveSM : public BaseSM { public: SlaveSM(const std::wstring& path, HANDLE channel) : BaseSM(channel), iterator_(NULL) { - cache_.reset(new disk_cache::BackendImpl(path)); + cache_.reset(new disk_cache::BackendImpl(FilePath::FromWStringHack(path))); if (!cache_->Init()) { printf("Unable to open cache files\n"); return; |