summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_session.h
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-23 18:49:00 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-23 18:49:00 +0000
commit635345132365492acb8c601be50f6877316886c3 (patch)
tree97ad2e27a2d2fe46acd1c3e5202f7648f68d3c9b /net/quic/quic_session.h
parentf65d8bea05badd0ac2a4efba0ba52b4e18722e15 (diff)
downloadchromium_src-635345132365492acb8c601be50f6877316886c3.zip
chromium_src-635345132365492acb8c601be50f6877316886c3.tar.gz
chromium_src-635345132365492acb8c601be50f6877316886c3.tar.bz2
Make all QUIC streams owned by the session. Add a Visitor interface to the stream, so that consumer can be informed when the stream will be deleted.
Merge internal change: 40355686 TBR=jar@chromium.org Review URL: https://chromiumcodereview.appspot.com/11644084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_session.h')
-rw-r--r--net/quic/quic_session.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/net/quic/quic_session.h b/net/quic/quic_session.h
index 4841627..b124226 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -110,6 +110,20 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
return max_open_streams_;
}
+ protected:
+ // This is called after every call other than OnConnectionClose from the
+ // QuicConnectionVisitor to allow post-processing once the work has been done.
+ // In this case, it deletes streams given that it's safe to do so (no other
+ // opterations are being done on the streams at this time)
+ virtual void PostProcessAfterData();
+
+ base::hash_map<QuicStreamId, ReliableQuicStream*>* streams() {
+ return &stream_map_;
+ }
+ std::vector<ReliableQuicStream*>* closed_streams() {
+ return &closed_streams_;
+ }
+
private:
friend class test::QuicSessionPeer;
friend class VisitorShim;
@@ -118,12 +132,6 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
ReliableQuicStream* GetStream(const QuicStreamId stream_id);
- // This is called after every call other than OnConnectionClose from the
- // QuicConnectionVisitor to allow post-processing once the work has been done.
- // In this case, it deletes streams given that it's safe to do so (no other
- // opterations are being done on the streams at this time)
- void PostProcessAfterData();
-
scoped_ptr<QuicConnection> connection_;
// A shim to stand between the connection and the session, to handle stream