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

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

Issue 1499673003: Adds response trailers to the QuicInMemoryCache's Responses. Currently unused, this is preparation … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108726817
Patch Set: Created 5 years 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/quic_in_memory_cache.h ('k') | net/tools/quic/quic_in_memory_cache_test.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.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;
}
« no previous file with comments | « net/tools/quic/quic_in_memory_cache.h ('k') | net/tools/quic/quic_in_memory_cache_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698