| 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..613a3d9ed0301daaed4d6b7729cdc2262f5646ff 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,34 @@ 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);
|
| +
|
| + // Adds |request| to |spdy_session_request_map_| under |spdy_session_key| Key.
|
| + // Sets |spdy_session_key| as |request|'s SpdySessionKey.
|
| + void AddRequestToSpdySessionRequestMap(
|
| + const SpdySessionKey& spdy_session_key,
|
| + HttpStreamFactoryImpl::Request* request);
|
| +
|
| + // Removes |request| from |spdy_session_request_map_|. No-op if |request| does
|
| + // not have a SpdySessionKey.
|
| + void RemoveRequestFromSpdySessionRequestMap(
|
| + 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 +271,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_;
|
|
|
|
|