| Index: net/disk_cache/disk_cache_test_base.h
|
| ===================================================================
|
| --- net/disk_cache/disk_cache_test_base.h (revision 51874)
|
| +++ net/disk_cache/disk_cache_test_base.h (working copy)
|
| @@ -36,7 +36,7 @@
|
| : 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 @@
|
| 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 @@
|
| 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 @@
|
| 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_;
|
|
|
|
|