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 613a3d9ed0301daaed4d6b7729cdc2262f5646ff..e3b8fc65768269a35e31d49ffabf89073cc3ec27 100644 |
| --- a/net/spdy/chromium/spdy_session_pool.h |
| +++ b/net/spdy/chromium/spdy_session_pool.h |
| @@ -179,6 +179,17 @@ class NET_EXPORT SpdySessionPool |
| bool using_spdy, |
| NetLogSource source_dependency); |
| + // Called when a HttpStreamRequest is started with |spdy_session_key|. |
| + // Returns true if the request should continue. Returns false if the request |
| + // should wait until |callback| is invoked before continuing. |
| + bool StartRequest(const SpdySessionKey& spdy_session_key, |
|
Bence
2017/06/09 19:17:40
Optional: return OK instead of true and discard |c
xunjieli
2017/06/13 15:23:11
Acknowledged. But the callback is not a net::Compl
|
| + const base::Closure& callback); |
| + |
| + // Resumes all pending requests with |spdy_session_key|. |
| + void ResumeAllPendingRequests(const SpdySessionKey& spdy_session_key); |
| + // Resumes the next pending request with |spdy_session_key|. |
| + void ResumeNextPendingRequest(const SpdySessionKey& spdy_session_key); |
|
Bence
2017/06/09 19:17:40
Do you think it is worth making this method privat
xunjieli
2017/06/13 15:23:11
Done.
|
| + |
| // Adds |request| to |spdy_session_request_map_| under |spdy_session_key| Key. |
| // Sets |spdy_session_key| as |request|'s SpdySessionKey. |
| void AddRequestToSpdySessionRequestMap( |
| @@ -271,7 +282,11 @@ class NET_EXPORT SpdySessionPool |
| // and maximum HPACK dynamic table size. |
| const SettingsMap initial_settings_; |
| + // TODO(xunjieli): Merge these two. |
| SpdySessionRequestMap spdy_session_request_map_; |
| + typedef std::map<SpdySessionKey, std::list<base::Closure>> |
| + SpdySessionPendingRequestMap; |
| + SpdySessionPendingRequestMap spdy_session_pending_request_map_; |
| TimeFunc time_func_; |
| ServerPushDelegate* push_delegate_; |