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

Unified Diff: net/spdy/spdy_stream.h

Issue 1272283003: Add a new SpdyStream::Delegate method to handle trailers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed tests Created 5 years, 4 months 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
Index: net/spdy/spdy_stream.h
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index 4c01e0cecef2c2234fdf9eea32b4a8a4fe4a1c93..190e2b4b09d8f5153b0f07c25d1e973ec5dd1e7b 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -57,7 +57,8 @@ enum SpdySendStatus {
// whether the current response headers are complete or not.
Ryan Hamilton 2015/08/10 17:23:25 Please update this comment to reflect the meaning
xunjieli 2015/08/10 20:31:07 Done. Good catch! I also updated comments below.
enum SpdyResponseHeadersStatus {
RESPONSE_HEADERS_ARE_INCOMPLETE,
- RESPONSE_HEADERS_ARE_COMPLETE
+ RESPONSE_HEADERS_ARE_COMPLETE,
+ TRAILERS_RECEIVED,
};
// The SpdyStream is used by the SpdySession to represent each stream known
@@ -139,6 +140,10 @@ class NET_EXPORT_PRIVATE SpdyStream {
// closed.
virtual void OnDataSent() = 0;
+ // Called when trailers are received. Note that trailers HEADER frame will
+ // have END_STREAM flag set, so this will be followed by OnClose.
+ virtual void OnTrailers(const SpdyHeaderBlock& trailers);
Ryan Hamilton 2015/08/10 17:23:25 Is it required by the spec that trailers have the
Ryan Hamilton 2015/08/10 17:23:25 I think this should be = 0 (pure virtual), shouldn
xunjieli 2015/08/10 20:31:07 Done. I was not sure if all implementations should
xunjieli 2015/08/10 20:31:07 The RFC says "The HEADERS frame starting the trail
+
// Called when SpdyStream is closed. No other delegate functions
// will be called after this is called, and the delegate must not
// access the stream after this is called. Must not cause the

Powered by Google App Engine
This is Rietveld 408576698