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

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

Issue 24493003: Factor out ServerThread from the QUIC EndToEndTest in order to reuse in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 7 years, 3 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 | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_in_memory_cache.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.h
diff --git a/net/tools/quic/quic_in_memory_cache.h b/net/tools/quic/quic_in_memory_cache.h
index 6322e2da49d76d03baef62c33cd34dc37e8c2e39..94f524a7616b8a19672c23641ac1abb97b2145fd 100644
--- a/net/tools/quic/quic_in_memory_cache.h
+++ b/net/tools/quic/quic_in_memory_cache.h
@@ -58,6 +58,15 @@ class QuicInMemoryCache {
// Currently, responses are selected based on request URI only.
const Response* GetResponse(const BalsaHeaders& request_headers) const;
+ // Adds a response to the cache if no matching entry exists.
+ // Otherwise it verifies that the existing entry matches.
+ void AddOrVerifyResponse(base::StringPiece method,
+ base::StringPiece path,
+ base::StringPiece version,
+ base::StringPiece response_code,
+ base::StringPiece response_detail,
+ base::StringPiece body);
+
// Add a response to the cache.
void AddResponse(const BalsaHeaders& request_headers,
const BalsaHeaders& response_headers,
@@ -67,10 +76,9 @@ class QuicInMemoryCache {
private:
typedef base::hash_map<std::string, Response*> ResponseMap;
-
+ friend struct DefaultSingletonTraits<QuicInMemoryCache>;
QuicInMemoryCache();
- friend struct DefaultSingletonTraits<QuicInMemoryCache>;
~QuicInMemoryCache();
void Initialize();
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_in_memory_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698