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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 588243002: Reland of "Remove void** from disk_cache interface" w/ blockfile iter fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1-webcacheimpl
Patch Set: cleanup presubmit 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/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/memory/mem_backend_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/entry_unittest.cc
diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc
index 803f98fe00973487d8014b0206ea31b5006eab7a..afe93acf2232abc53a5d702363a2777ff501cd25 100644
--- a/net/disk_cache/entry_unittest.cc
+++ b/net/disk_cache/entry_unittest.cc
@@ -1617,10 +1617,10 @@ TEST_F(DiskCacheEntryTest, MemoryOnlyEnumerationWithSparseEntries) {
parent_entry->Close();
// Perform the enumerations.
- void* iter = NULL;
+ scoped_ptr<TestIterator> iter = CreateIterator();
disk_cache::Entry* entry = NULL;
int count = 0;
- while (OpenNextEntry(&iter, &entry) == net::OK) {
+ while (iter->OpenNextEntry(&entry) == net::OK) {
ASSERT_TRUE(entry != NULL);
++count;
disk_cache::MemEntryImpl* mem_entry =
@@ -2217,10 +2217,10 @@ TEST_F(DiskCacheEntryTest, CleanupSparseEntry) {
entry->Close();
EXPECT_EQ(4, cache_->GetEntryCount());
- void* iter = NULL;
+ scoped_ptr<TestIterator> iter = CreateIterator();
int count = 0;
std::string child_key[2];
- while (OpenNextEntry(&iter, &entry) == net::OK) {
+ while (iter->OpenNextEntry(&entry) == net::OK) {
ASSERT_TRUE(entry != NULL);
// Writing to an entry will alter the LRU list and invalidate the iterator.
if (entry->GetKey() != key && count < 2)
« no previous file with comments | « net/disk_cache/disk_cache_test_base.cc ('k') | net/disk_cache/memory/mem_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698