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

Unified Diff: net/disk_cache/entry_unittest.cc

Issue 542733002: Remove void** from disk_cache interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix EnumerateAndMatchKeys 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
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)

Powered by Google App Engine
This is Rietveld 408576698