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

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

Issue 1037533002: Make initialization of the QuicInMemoryCache explicit to avoid spooky action at a distance which co… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | net/tools/quic/quic_in_memory_cache.cc » ('j') | net/tools/quic/quic_in_memory_cache.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_in_memory_cache.h
diff --git a/net/tools/quic/quic_in_memory_cache.h b/net/tools/quic/quic_in_memory_cache.h
index f92c67922df9235fa166b577755b6ebecaa8fa4d..aaff60b2d1aeaa137ee85096e437357dfc696531 100644
--- a/net/tools/quic/quic_in_memory_cache.h
+++ b/net/tools/quic/quic_in_memory_cache.h
@@ -21,8 +21,6 @@ namespace test {
class QuicInMemoryCachePeer;
} // namespace
-extern std::string FLAGS_quic_in_memory_cache_dir;
-
class QuicServer;
// In-memory cache for HTTP responses.
@@ -93,6 +91,9 @@ class QuicInMemoryCache {
base::StringPiece path,
SpecialResponseType response_type);
+ // |cache_cirectory| can be generated using `wget -p --save-headers <url>`.
+ void InitializeFromDirectory(const std::string& cache_directory);
+
private:
typedef base::hash_map<std::string, Response*> ResponseMap;
friend struct DefaultSingletonTraits<QuicInMemoryCache>;
@@ -103,8 +104,6 @@ class QuicInMemoryCache {
void ResetForTests();
- void Initialize();
-
void AddResponseImpl(base::StringPiece host,
base::StringPiece path,
SpecialResponseType response_type,
« no previous file with comments | « no previous file | net/tools/quic/quic_in_memory_cache.cc » ('j') | net/tools/quic/quic_in_memory_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698