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

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

Issue 585833002: Revert of Remove void** from disk_cache interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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.h ('k') | net/url_request/view_cache_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/simple_cache_dumper.cc
diff --git a/net/tools/dump_cache/simple_cache_dumper.cc b/net/tools/dump_cache/simple_cache_dumper.cc
index dd5ecbf15f65c010896502d80379468257fa7f06..56162ca3e10905e2e327ea3a807f20519047d947 100644
--- a/net/tools/dump_cache/simple_cache_dumper.cc
+++ b/net/tools/dump_cache/simple_cache_dumper.cc
@@ -26,6 +26,7 @@
output_path_(output_path),
writer_(new DiskDumper(output_path)),
cache_thread_(new base::Thread("CacheThead")),
+ iter_(NULL),
src_entry_(NULL),
dst_entry_(NULL),
io_callback_(base::Bind(&SimpleCacheDumper::OnIOComplete,
@@ -149,15 +150,15 @@
DCHECK(!dst_entry_);
DCHECK(!src_entry_);
state_ = STATE_OPEN_ENTRY_COMPLETE;
- if (!iter_)
- iter_ = cache_->CreateIterator();
- return iter_->OpenNextEntry(&src_entry_, io_callback_);
+ return cache_->OpenNextEntry(&iter_, &src_entry_, io_callback_);
}
int SimpleCacheDumper::DoOpenEntryComplete(int rv) {
// ERR_FAILED indicates iteration finished.
- if (rv == ERR_FAILED)
+ if (rv == ERR_FAILED) {
+ cache_->EndEnumeration(&iter_);
return OK;
+ }
if (rv < 0)
return rv;
« no previous file with comments | « net/tools/dump_cache/simple_cache_dumper.h ('k') | net/url_request/view_cache_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698