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

Unified Diff: net/tools/dump_cache/upgrade_win.cc

Issue 20737002: Change the API of disk_cache::CreateCacheBackend to use scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new test Created 7 years, 5 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
« no previous file with comments | « net/tools/dump_cache/simple_cache_dumper.cc ('k') | webkit/browser/appcache/appcache_disk_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/upgrade_win.cc
diff --git a/net/tools/dump_cache/upgrade_win.cc b/net/tools/dump_cache/upgrade_win.cc
index 6c7def97d5c4b3d14ed1d44cd024f511c1687e31..5135592429b4d4a7a842e7cfd914c545434efd49 100644
--- a/net/tools/dump_cache/upgrade_win.cc
+++ b/net/tools/dump_cache/upgrade_win.cc
@@ -319,7 +319,7 @@ bool MasterSM::DoInit() {
DEBUGMSG("Master DoInit\n");
DCHECK(state_ == MASTER_INITIAL);
- disk_cache::Backend* cache;
+ scoped_ptr<disk_cache::Backend> cache;
net::TestCompletionCallback cb;
int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
net::CACHE_BACKEND_DEFAULT, path_, 0,
@@ -330,7 +330,7 @@ bool MasterSM::DoInit() {
printf("Unable to initialize new files\n");
return false;
}
- cache_.reset(cache);
+ cache_ = cache.Pass();
writer_ = new CacheDumper(cache_.get());
copied_entries_ = 0;
@@ -594,7 +594,7 @@ class SlaveSM : public BaseSM {
SlaveSM::SlaveSM(const base::FilePath& path, HANDLE channel)
: BaseSM(channel), iterator_(NULL) {
- disk_cache::Backend* cache;
+ scoped_ptr<disk_cache::Backend> cache;
net::TestCompletionCallback cb;
int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE,
net::CACHE_BACKEND_BLOCKFILE, path, 0,
@@ -605,7 +605,7 @@ SlaveSM::SlaveSM(const base::FilePath& path, HANDLE channel)
printf("Unable to open cache files\n");
return;
}
- cache_.reset(reinterpret_cast<disk_cache::BackendImpl*>(cache));
+ cache_.reset(reinterpret_cast<disk_cache::BackendImpl*>(cache.release()));
cache_->SetUpgradeMode();
}
« no previous file with comments | « net/tools/dump_cache/simple_cache_dumper.cc ('k') | webkit/browser/appcache/appcache_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698