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

Unified Diff: net/disk_cache/disk_cache_test_base.h

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/disk_cache_test_base.h
diff --git a/net/disk_cache/disk_cache_test_base.h b/net/disk_cache/disk_cache_test_base.h
index b724906289528dc425c41606cdabb71941602170..225d37fc98e4135c851717769bb509000ba41513 100644
--- a/net/disk_cache/disk_cache_test_base.h
+++ b/net/disk_cache/disk_cache_test_base.h
@@ -11,6 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread.h"
#include "net/base/cache_type.h"
+#include "net/disk_cache/disk_cache.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
@@ -57,6 +58,17 @@ class DiskCacheTest : public PlatformTest {
// Provides basic support for cache related tests.
class DiskCacheTestWithCache : public DiskCacheTest {
protected:
+ class TestIterator {
+ public:
+ explicit TestIterator(scoped_ptr<disk_cache::Backend::Iterator> iterator);
+ ~TestIterator();
+
+ int OpenNextEntry(disk_cache::Entry** next_entry);
+
+ private:
+ scoped_ptr<disk_cache::Backend::Iterator> iterator_;
+ };
+
DiskCacheTestWithCache();
virtual ~DiskCacheTestWithCache();
@@ -117,7 +129,7 @@ class DiskCacheTestWithCache : public DiskCacheTest {
int DoomEntriesBetween(const base::Time initial_time,
const base::Time end_time);
int DoomEntriesSince(const base::Time initial_time);
- int OpenNextEntry(void** iter, disk_cache::Entry** next_entry);
+ scoped_ptr<TestIterator> CreateIterator();
void FlushQueueForTest();
void RunTaskForTest(const base::Closure& closure);
int ReadData(disk_cache::Entry* entry, int index, int offset,

Powered by Google App Engine
This is Rietveld 408576698