| Index: net/spdy/spdy_session.h
|
| diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
|
| index 61f0632fa9e00d27efaf9ab351c8eef8d32897a6..705477d4b9a2a722dd5ebb9fa5b623a8d76010fc 100644
|
| --- a/net/spdy/spdy_session.h
|
| +++ b/net/spdy/spdy_session.h
|
| @@ -33,6 +33,7 @@
|
| #include "net/socket/stream_socket.h"
|
| #include "net/spdy/buffered_spdy_framer.h"
|
| #include "net/spdy/http2_priority_dependencies.h"
|
| +#include "net/spdy/server_push_delegate.h"
|
| #include "net/spdy/spdy_alt_svc_wire_format.h"
|
| #include "net/spdy/spdy_buffer.h"
|
| #include "net/spdy/spdy_framer.h"
|
| @@ -326,6 +327,14 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
|
| base::WeakPtr<SpdyStream>* spdy_stream,
|
| const NetLogWithSource& stream_net_log);
|
|
|
| + void set_push_delegate(ServerPushDelegate* push_delegate) {
|
| + push_delegate_ = push_delegate;
|
| + }
|
| +
|
| + // Called when the pushed stream should be cancelled. If the pushed stream is
|
| + // not claimed and active, sends RST to the server to cancel the stream.
|
| + void CancelPush(const GURL& url);
|
| +
|
| // Initialize the session with the given connection. |is_secure|
|
| // must indicate whether |connection| uses an SSL socket or not; it
|
| // is usually true, but it can be false for testing or when SPDY is
|
| @@ -574,6 +583,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
|
| FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, DeleteExpiredPushStreams);
|
| FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, MetricsCollectionOnPushStreams);
|
| FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, CancelPushBeforeClaimed);
|
| + FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, CancelPushAfterSessionGoesAway);
|
| FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, CancelPushAfterExpired);
|
| FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ProtocolNegotiation);
|
| FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, ClearSettings);
|
| @@ -677,10 +687,6 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
|
| SpdyPriority priority,
|
| SpdyHeaderBlock headers);
|
|
|
| - // Called when the pushed stream should be cancelled. If the pushed stream is
|
| - // not claimed and active, sends RST to the server to cancel the stream.
|
| - void CancelPush(const GURL& url);
|
| -
|
| // Close the stream pointed to by the given iterator. Note that that
|
| // stream may hold the last reference to the session.
|
| void CloseActiveStreamIterator(ActiveStreamMap::iterator it, int status);
|
| @@ -1043,6 +1049,10 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
|
|
|
| UnclaimedPushedStreamContainer unclaimed_pushed_streams_;
|
|
|
| + // Not owned. |push_delegate_| outlives the session and handles server pushes
|
| + // received by session.
|
| + ServerPushDelegate* push_delegate_;
|
| +
|
| // Set of all created streams but that have not yet sent any frames.
|
| //
|
| // |created_streams_| owns all its SpdyStream objects.
|
|
|