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

Unified Diff: net/spdy/spdy_session.h

Issue 301573002: Fix WeakPtrFactory member order in net/spdy and net/dns (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 80578b849f3aba87ca2cfcff842d720345a1b3fa..e97f6d3a9b7744ff30bb366e29256bf3947dc8b2 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -180,7 +180,6 @@ class NET_EXPORT_PRIVATE SpdyStreamRequest {
void Reset();
- base::WeakPtrFactory<SpdyStreamRequest> weak_ptr_factory_;
SpdyStreamType type_;
base::WeakPtr<SpdySession> session_;
base::WeakPtr<SpdyStream> stream_;
@@ -189,6 +188,8 @@ class NET_EXPORT_PRIVATE SpdyStreamRequest {
BoundNetLog net_log_;
CompletionCallback callback_;
+ base::WeakPtrFactory<SpdyStreamRequest> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SpdyStreamRequest);
};
@@ -927,12 +928,6 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// or NULL, if the transport is not SSL.
SSLClientSocket* GetSSLClientSocket() const;
- // Used for posting asynchronous IO tasks. We use this even though
- // SpdySession is refcounted because we don't need to keep the SpdySession
- // alive if the last reference is within a RunnableMethod. Just revoke the
- // method.
- base::WeakPtrFactory<SpdySession> weak_factory_;
-
// Whether Do{Read,Write}Loop() is in the call stack. Useful for
// making sure we don't destroy ourselves prematurely in that case.
bool in_io_loop_;
@@ -1128,6 +1123,12 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
HostPortPair trusted_spdy_proxy_;
TimeFunc time_func_;
+
+ // Used for posting asynchronous IO tasks. We use this even though
+ // SpdySession is refcounted because we don't need to keep the SpdySession
+ // alive if the last reference is within a RunnableMethod. Just revoke the
+ // method.
+ base::WeakPtrFactory<SpdySession> weak_factory_;
};
} // namespace net
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698