summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_stream.h
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 09:37:27 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-22 09:37:27 +0000
commit795cbf848605eefc41317a572797518afbf7409f (patch)
treea9f7873c09492165a674292f9a90042ba5a077a0 /net/spdy/spdy_stream.h
parent7504bb326ecc376f0a45670740aba2b06cf9b3dc (diff)
downloadchromium_src-795cbf848605eefc41317a572797518afbf7409f.zip
chromium_src-795cbf848605eefc41317a572797518afbf7409f.tar.gz
chromium_src-795cbf848605eefc41317a572797518afbf7409f.tar.bz2
[SPDY] Use WeakPtr<SpdySession> everywhere but SpdySessionPool
Make SpdyHttpStream cache it's SPDY stream's LoadTimingInfo on close. Also, make SpdyHttpStream query SpdySession::IsReused() when it's constructed and cache the value, as that's closer to the intent of its use. Avoid uses of SpdySession::IsClosed() in non-test code and add TODO to remove uses from test code. This is more correct since testing the WeakPtr is a stronger condition than testing openness and SpdySession functions already do the right thing if the SpdySession is already closed. Tweak some tests that implicitly depended on having refs to SpdySession. BUG=255701 R=rch@chromium.org Review URL: https://codereview.chromium.org/18546008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212858 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_stream.h')
-rw-r--r--net/spdy/spdy_stream.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/spdy/spdy_stream.h b/net/spdy/spdy_stream.h
index 185d3e4..1db1217 100644
--- a/net/spdy/spdy_stream.h
+++ b/net/spdy/spdy_stream.h
@@ -157,7 +157,7 @@ class NET_EXPORT_PRIVATE SpdyStream {
// SpdyStream constructor
SpdyStream(SpdyStreamType type,
- SpdySession* session,
+ const base::WeakPtr<SpdySession>& session,
const GURL& url,
RequestPriority priority,
int32 initial_send_window_size,
@@ -334,7 +334,7 @@ class NET_EXPORT_PRIVATE SpdyStream {
// it.
void Close();
- // Must be used only by the SpdySession.
+ // Must be used only by |session_|.
base::WeakPtr<SpdyStream> GetWeakPtr();
// Interface for the delegate to use.
@@ -490,7 +490,7 @@ class NET_EXPORT_PRIVATE SpdyStream {
ScopedBandwidthMetrics metrics_;
- scoped_refptr<SpdySession> session_;
+ const base::WeakPtr<SpdySession> session_;
// The transaction should own the delegate.
SpdyStream::Delegate* delegate_;