diff options
Diffstat (limited to 'net/disk_cache/disk_cache_test_base.h')
-rw-r--r-- | net/disk_cache/disk_cache_test_base.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/disk_cache/disk_cache_test_base.h b/net/disk_cache/disk_cache_test_base.h index f3c8040..6c6b54b 100644 --- a/net/disk_cache/disk_cache_test_base.h +++ b/net/disk_cache/disk_cache_test_base.h @@ -36,7 +36,7 @@ class DiskCacheTestWithCache : public DiskCacheTest { : cache_(NULL), cache_impl_(NULL), mem_cache_(NULL), mask_(0), size_(0), memory_only_(false), implementation_(false), force_creation_(false), new_eviction_(false), first_cleanup_(true), integrity_(true), - cache_thread_("CacheThread") {} + use_current_thread_(false), cache_thread_("CacheThread") {} void InitCache(); virtual void TearDown(); @@ -75,6 +75,10 @@ class DiskCacheTestWithCache : public DiskCacheTest { integrity_ = false; } + void UseCurrentThread() { + use_current_thread_ = true; + } + // Utility methods to access the cache and wait for each operation to finish. int OpenEntry(const std::string& key, disk_cache::Entry** entry); int CreateEntry(const std::string& key, disk_cache::Entry** entry); @@ -84,6 +88,7 @@ class DiskCacheTestWithCache : public DiskCacheTest { const base::Time end_time); int DoomEntriesSince(const base::Time initial_time); int OpenNextEntry(void** iter, disk_cache::Entry** next_entry); + void FlushQueueForTest(); // cache_ will always have a valid object, regardless of how the cache was // initialized. The implementation pointers can be NULL. @@ -99,6 +104,7 @@ class DiskCacheTestWithCache : public DiskCacheTest { bool new_eviction_; bool first_cleanup_; bool integrity_; + bool use_current_thread_; // This is intentionally left uninitialized, to be used by any test. bool success_; |