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

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

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 | « no previous file | 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 5ceaf52e9e9c0e4d3fa7e321e04848ea4d4e9701..f6ef75b133e88b0f227d1d7d9517b7c0a6caf4f5 100644
--- a/net/tools/quic/quic_in_memory_cache.h
+++ b/net/tools/quic/quic_in_memory_cache.h
@@ -66,6 +66,7 @@ class QuicInMemoryCache {
SpecialResponseType response_type() const { return response_type_; }
const SpdyHeaderBlock& headers() const { return headers_; }
+ const SpdyHeaderBlock& trailers() const { return trailers_; }
const base::StringPiece body() const { return base::StringPiece(body_); }
void set_response_type(SpecialResponseType response_type) {
@@ -74,6 +75,7 @@ class QuicInMemoryCache {
void set_headers(const SpdyHeaderBlock& headers) {
headers_ = headers;
}
+ void set_trailers(const SpdyHeaderBlock& trailers) { trailers_ = trailers; }
void set_body(base::StringPiece body) {
body.CopyToString(&body_);
}
@@ -81,7 +83,8 @@ class QuicInMemoryCache {
private:
SpecialResponseType response_type_;
SpdyHeaderBlock headers_;
- string body_;
+ SpdyHeaderBlock trailers_;
+ std::string body_;
DISALLOW_COPY_AND_ASSIGN(Response);
};
@@ -118,6 +121,13 @@ class QuicInMemoryCache {
const SpdyHeaderBlock& response_headers,
base::StringPiece response_body);
+ // Add a response, with trailers, to the cache.
+ void AddResponse(base::StringPiece host,
+ base::StringPiece path,
+ const SpdyHeaderBlock& response_headers,
+ base::StringPiece response_body,
+ const SpdyHeaderBlock& response_trailers);
+
// Simulate a special behavior at a particular path.
void AddSpecialResponse(base::StringPiece host,
base::StringPiece path,
@@ -148,7 +158,8 @@ class QuicInMemoryCache {
base::StringPiece path,
SpecialResponseType response_type,
const SpdyHeaderBlock& response_headers,
- base::StringPiece response_body);
+ base::StringPiece response_body,
+ const SpdyHeaderBlock& response_trailers);
string GetKey(base::StringPiece host, base::StringPiece path) const;
« no previous file with comments | « no previous file | net/tools/quic/quic_in_memory_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698