| 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 0671099e1ee577bd5c121e41037db23627a05a83..fd77050b49e91ccb6f6c680e4cef27e71a287a27 100644
|
| --- a/net/tools/quic/quic_in_memory_cache.cc
|
| +++ b/net/tools/quic/quic_in_memory_cache.cc
|
| @@ -85,14 +85,24 @@ void QuicInMemoryCache::AddResponse(StringPiece host,
|
| StringPiece path,
|
| const SpdyHeaderBlock& response_headers,
|
| StringPiece response_body) {
|
| - AddResponseImpl(host, path, REGULAR_RESPONSE, response_headers,
|
| - response_body);
|
| + AddResponseImpl(host, path, REGULAR_RESPONSE, response_headers, response_body,
|
| + SpdyHeaderBlock());
|
| +}
|
| +
|
| +void QuicInMemoryCache::AddResponse(StringPiece host,
|
| + StringPiece path,
|
| + const SpdyHeaderBlock& response_headers,
|
| + StringPiece response_body,
|
| + const SpdyHeaderBlock& response_trailers) {
|
| + AddResponseImpl(host, path, REGULAR_RESPONSE, response_headers, response_body,
|
| + response_trailers);
|
| }
|
|
|
| void QuicInMemoryCache::AddSpecialResponse(StringPiece host,
|
| StringPiece path,
|
| SpecialResponseType response_type) {
|
| - AddResponseImpl(host, path, response_type, SpdyHeaderBlock(), "");
|
| + AddResponseImpl(host, path, response_type, SpdyHeaderBlock(), "",
|
| + SpdyHeaderBlock());
|
| }
|
|
|
| QuicInMemoryCache::QuicInMemoryCache() {}
|
| @@ -187,11 +197,13 @@ QuicInMemoryCache::~QuicInMemoryCache() {
|
| STLDeleteValues(&responses_);
|
| }
|
|
|
| -void QuicInMemoryCache::AddResponseImpl(StringPiece host,
|
| - StringPiece path,
|
| - SpecialResponseType response_type,
|
| - const SpdyHeaderBlock& response_headers,
|
| - StringPiece response_body) {
|
| +void QuicInMemoryCache::AddResponseImpl(
|
| + StringPiece host,
|
| + StringPiece path,
|
| + SpecialResponseType response_type,
|
| + const SpdyHeaderBlock& response_headers,
|
| + StringPiece response_body,
|
| + const SpdyHeaderBlock& response_trailers) {
|
| string key = GetKey(host, path);
|
| if (ContainsKey(responses_, key)) {
|
| LOG(DFATAL) << "Response for '" << key << "' already exists!";
|
| @@ -201,6 +213,7 @@ void QuicInMemoryCache::AddResponseImpl(StringPiece host,
|
| new_response->set_response_type(response_type);
|
| new_response->set_headers(response_headers);
|
| new_response->set_body(response_body);
|
| + new_response->set_trailers(response_trailers);
|
| responses_[key] = new_response;
|
| }
|
|
|
|
|