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

Unified Diff: net/tools/quic/quic_in_memory_cache.cc

Issue 2518063007: Pass QuicInMemoryCache directly instead of using a singleton. (Closed)
Patch Set: Fix Cronet compile error Created 4 years, 1 month 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
« no previous file with comments | « net/tools/quic/quic_in_memory_cache.h ('k') | net/tools/quic/quic_in_memory_cache_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_in_memory_cache.cc
diff --git a/net/tools/quic/quic_in_memory_cache.cc b/net/tools/quic/quic_in_memory_cache.cc
index 392a848b48c1f3c76db39f361ed5c17b19bb5137..8f6ec929f802948147decb868926c04ffe660dd3 100644
--- a/net/tools/quic/quic_in_memory_cache.cc
+++ b/net/tools/quic/quic_in_memory_cache.cc
@@ -155,11 +155,6 @@ void QuicInMemoryCache::ResourceFile::HandleXOriginalUrl() {
SetHostPathFromBase(url);
}
-// static
-QuicInMemoryCache* QuicInMemoryCache::GetInstance() {
- return base::Singleton<QuicInMemoryCache>::get();
-}
-
const QuicInMemoryCache::Response* QuicInMemoryCache::GetResponse(
StringPiece host,
StringPiece path) const {
@@ -231,12 +226,6 @@ void QuicInMemoryCache::AddSpecialResponse(StringPiece host,
QuicInMemoryCache::QuicInMemoryCache() {}
-void QuicInMemoryCache::ResetForTests() {
- base::AutoLock lock(response_mutex_);
- responses_.clear();
- server_push_resources_.clear();
-}
-
void QuicInMemoryCache::InitializeFromDirectory(const string& cache_directory) {
if (cache_directory.empty()) {
QUIC_BUG << "cache_directory must not be empty.";
« no previous file with comments | « net/tools/quic/quic_in_memory_cache.h ('k') | net/tools/quic/quic_in_memory_cache_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698