summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_client_session.h
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 04:00:20 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-26 04:00:20 +0000
commit35103d39bf8451e954ce6d34948874ad9d563b2d (patch)
tree19fb4c783c6b64d713e678a2a7e7574051f01dda /net/quic/quic_client_session.h
parent73b1e4cec881d222fbe4491cc46a01ceb46b67e2 (diff)
downloadchromium_src-35103d39bf8451e954ce6d34948874ad9d563b2d.zip
chromium_src-35103d39bf8451e954ce6d34948874ad9d563b2d.tar.gz
chromium_src-35103d39bf8451e954ce6d34948874ad9d563b2d.tar.bz2
Make sure that QUIC connections correctly call OnSessionClose
under all code paths. In addition, always make this notification asynchronously to simply object lifetime issues. BUG= Review URL: https://chromiumcodereview.appspot.com/17748005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_client_session.h')
-rw-r--r--net/quic/quic_client_session.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/quic/quic_client_session.h b/net/quic/quic_client_session.h
index deeb142..893cfe6 100644
--- a/net/quic/quic_client_session.h
+++ b/net/quic/quic_client_session.h
@@ -62,7 +62,8 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession {
// and passing the data along to the QuicConnection.
void StartReading();
- // Close the session because of |error|.
+ // Close the session because of |error| and notifies the factory
+ // that this session has been closed, which will delete the session.
void CloseSessionOnError(int error);
base::Value* GetInfoAsValue(const HostPortPair& pair) const;
@@ -79,6 +80,15 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession {
// A completion callback invoked when a read completes.
void OnReadComplete(int result);
+ void CloseSessionOnErrorInner(int error);
+
+ // Posts a task to notify the factory that this session has been closed.
+ void NotifyFactoryOfSessionCloseLater();
+
+ // Notifies the factory that this session has been closed which will
+ // delete |this|.
+ void NotifyFactoryOfSessionClose();
+
base::WeakPtrFactory<QuicClientSession> weak_factory_;
scoped_ptr<QuicCryptoClientStream> crypto_stream_;
QuicStreamFactory* stream_factory_;