Chromium Code Reviews| Index: net/spdy/chromium/spdy_session_pool.h |
| diff --git a/net/spdy/chromium/spdy_session_pool.h b/net/spdy/chromium/spdy_session_pool.h |
| index 186cca9d7907b91539c9625fe1ec12ffd943a1bd..0deea885896e88533fbd8f336e112e65c3e8351d 100644 |
| --- a/net/spdy/chromium/spdy_session_pool.h |
| +++ b/net/spdy/chromium/spdy_session_pool.h |
| @@ -21,6 +21,7 @@ |
| #include "net/base/net_export.h" |
| #include "net/base/network_change_notifier.h" |
| #include "net/cert/cert_database.h" |
| +#include "net/http/http_stream_factory_impl_request.h" |
| #include "net/proxy/proxy_config.h" |
| #include "net/proxy/proxy_server.h" |
| #include "net/spdy/chromium/server_push_delegate.h" |
| @@ -166,9 +167,30 @@ class NET_EXPORT SpdySessionPool |
| void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd, |
| const SpdyString& parent_dump_absolute_name) const; |
| + // Called when a SpdySession is ready. It will find appropriate Requests and |
| + // fulfill them. |direct| indicates whether or not |spdy_session| uses a |
| + // proxy. |
| + void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session, |
| + bool direct, |
| + const SSLConfig& used_ssl_config, |
| + const ProxyInfo& used_proxy_info, |
| + bool was_alpn_negotiated, |
| + NextProto negotiated_protocol, |
| + bool using_spdy, |
| + NetLogSource source_dependency); |
| + |
| + void RemoveRequestFromSpdySessionRequestMap( |
|
Bence
2017/06/07 17:41:43
Please add comments for all public methods.
Bence
2017/06/07 17:41:43
Optional: You could list "Add" before "Remove", th
xunjieli
2017/06/07 21:55:56
Done.
xunjieli
2017/06/07 21:55:56
Done.
|
| + HttpStreamFactoryImpl::Request* request); |
| + |
| + void AddRequestToSpdySessionRequestMap( |
| + const SpdySessionKey& spdy_session_key, |
| + HttpStreamFactoryImpl::Request* request); |
| + |
| private: |
| friend class SpdySessionPoolPeer; // For testing. |
| + typedef std::set<HttpStreamFactoryImpl::Request*> RequestSet; |
| + typedef std::map<SpdySessionKey, RequestSet> SpdySessionRequestMap; |
| typedef std::set<SpdySession*> SessionSet; |
| typedef std::vector<base::WeakPtr<SpdySession> > WeakSessionList; |
| typedef std::map<SpdySessionKey, base::WeakPtr<SpdySession> > |
| @@ -245,6 +267,8 @@ class NET_EXPORT SpdySessionPool |
| // and maximum HPACK dynamic table size. |
| const SettingsMap initial_settings_; |
| + SpdySessionRequestMap spdy_session_request_map_; |
| + |
| TimeFunc time_func_; |
| ServerPushDelegate* push_delegate_; |