diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-26 03:46:44 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-26 03:46:44 +0000 |
commit | e97101867e20a3a149448e235da6d24cd5147f46 (patch) | |
tree | 8b6721b4cc3ce91d0092ce0d79473a207b5d0cd4 /net/tools/quic/quic_in_memory_cache.h | |
parent | 4c55f2ce9f73616c0a189bc5edc9d4a7f4913c12 (diff) | |
download | chromium_src-e97101867e20a3a149448e235da6d24cd5147f46.zip chromium_src-e97101867e20a3a149448e235da6d24cd5147f46.tar.gz chromium_src-e97101867e20a3a149448e235da6d24cd5147f46.tar.bz2 |
Factor out ServerThread from the QUIC EndToEndTest in order to reuse in
a Chromium test.
Merge internal change: 53205265
Review URL: https://codereview.chromium.org/24493003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools/quic/quic_in_memory_cache.h')
-rw-r--r-- | net/tools/quic/quic_in_memory_cache.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/tools/quic/quic_in_memory_cache.h b/net/tools/quic/quic_in_memory_cache.h index 6322e2d..94f524a7 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(); |