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 b3e08f8d36a4423be09f8d237116bc0c2a1cc994..af46ca37daaa6c5f5a2bcaeab410cc221f69c11e 100644 |
--- a/net/tools/quic/quic_in_memory_cache.cc |
+++ b/net/tools/quic/quic_in_memory_cache.cc |
@@ -110,6 +110,18 @@ void QuicInMemoryCache::AddResponse(const BalsaHeaders& request_headers, |
responses_[GetKey(request_headers)] = new_response; |
} |
+void QuicInMemoryCache::AddSpecialResponse(StringPiece method, |
+ StringPiece path, |
+ StringPiece version, |
+ SpecialResponseType response_type) { |
+ BalsaHeaders request_headers, response_headers; |
+ request_headers.SetRequestFirstlineFromStringPieces(method, |
+ path, |
+ version); |
+ AddResponse(request_headers, response_headers, ""); |
+ responses_[GetKey(request_headers)]->response_type_ = response_type; |
+} |
+ |
QuicInMemoryCache::QuicInMemoryCache() { |
Initialize(); |
} |