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

Unified Diff: net/disk_cache/disk_cache_test_base.h

Issue 2827043: Disk cache: Switch the disk cache to use the cache_thread. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: ... and the fix Created 10 years, 5 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
===================================================================
--- net/disk_cache/disk_cache_test_base.h (revision 51470)
+++ 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_;

Powered by Google App Engine
This is Rietveld 408576698