Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_SPDY_SPDY_SESSION_POOL_H_ | 5 #ifndef NET_SPDY_SPDY_SESSION_POOL_H_ |
| 6 #define NET_SPDY_SPDY_SESSION_POOL_H_ | 6 #define NET_SPDY_SPDY_SESSION_POOL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | |
| 11 #include <set> | 12 #include <set> |
| 12 #include <string> | 13 #include <string> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 18 #include "net/base/host_port_pair.h" | 19 #include "net/base/host_port_pair.h" |
| 19 #include "net/base/ip_endpoint.h" | 20 #include "net/base/ip_endpoint.h" |
| 20 #include "net/base/net_errors.h" | 21 #include "net/base/net_errors.h" |
| 21 #include "net/base/net_export.h" | 22 #include "net/base/net_export.h" |
| 22 #include "net/base/network_change_notifier.h" | 23 #include "net/base/network_change_notifier.h" |
| 23 #include "net/cert/cert_database.h" | 24 #include "net/cert/cert_database.h" |
| 24 #include "net/proxy/proxy_config.h" | 25 #include "net/proxy/proxy_config.h" |
| 25 #include "net/proxy/proxy_server.h" | 26 #include "net/proxy/proxy_server.h" |
| 26 #include "net/spdy/server_push_delegate.h" | 27 #include "net/spdy/server_push_delegate.h" |
| 28 #include "net/spdy/spdy_protocol.h" | |
| 27 #include "net/spdy/spdy_session_key.h" | 29 #include "net/spdy/spdy_session_key.h" |
| 28 #include "net/ssl/ssl_config_service.h" | 30 #include "net/ssl/ssl_config_service.h" |
| 29 | 31 |
| 30 namespace base { | 32 namespace base { |
| 31 namespace trace_event { | 33 namespace trace_event { |
| 32 class ProcessMemoryDump; | 34 class ProcessMemoryDump; |
| 33 } | 35 } |
| 34 } | 36 } |
| 35 | 37 |
| 36 namespace net { | 38 namespace net { |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 50 public CertDatabase::Observer { | 52 public CertDatabase::Observer { |
| 51 public: | 53 public: |
| 52 typedef base::TimeTicks (*TimeFunc)(void); | 54 typedef base::TimeTicks (*TimeFunc)(void); |
| 53 | 55 |
| 54 SpdySessionPool(HostResolver* host_resolver, | 56 SpdySessionPool(HostResolver* host_resolver, |
| 55 SSLConfigService* ssl_config_service, | 57 SSLConfigService* ssl_config_service, |
| 56 HttpServerProperties* http_server_properties, | 58 HttpServerProperties* http_server_properties, |
| 57 TransportSecurityState* transport_security_state, | 59 TransportSecurityState* transport_security_state, |
| 58 bool enable_ping_based_connection_checking, | 60 bool enable_ping_based_connection_checking, |
| 59 size_t session_max_recv_window_size, | 61 size_t session_max_recv_window_size, |
| 60 size_t stream_max_recv_window_size, | 62 const SettingsMap& settings, |
| 61 SpdySessionPool::TimeFunc time_func, | 63 SpdySessionPool::TimeFunc time_func, |
| 62 ProxyDelegate* proxy_delegate); | 64 ProxyDelegate* proxy_delegate); |
| 63 ~SpdySessionPool() override; | 65 ~SpdySessionPool() override; |
| 64 | 66 |
| 65 // In the functions below, a session is "available" if this pool has | 67 // In the functions below, a session is "available" if this pool has |
| 66 // a reference to it and there is some SpdySessionKey for which | 68 // a reference to it and there is some SpdySessionKey for which |
| 67 // FindAvailableSession() will return it. A session is "unavailable" | 69 // FindAvailableSession() will return it. A session is "unavailable" |
| 68 // if this pool has a reference to it but it won't be returned by | 70 // if this pool has a reference to it but it won't be returned by |
| 69 // FindAvailableSession() for any SpdySessionKey; for example, this | 71 // FindAvailableSession() for any SpdySessionKey; for example, this |
| 70 // can happen when a session receives a GOAWAY frame and is still | 72 // can happen when a session receives a GOAWAY frame and is still |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 222 // same GURL. | 224 // same GURL. |
| 223 UnclaimedPushedStreamMap unclaimed_pushed_streams_; | 225 UnclaimedPushedStreamMap unclaimed_pushed_streams_; |
| 224 | 226 |
| 225 const scoped_refptr<SSLConfigService> ssl_config_service_; | 227 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 226 HostResolver* const resolver_; | 228 HostResolver* const resolver_; |
| 227 | 229 |
| 228 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. | 230 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. |
| 229 bool enable_sending_initial_data_; | 231 bool enable_sending_initial_data_; |
| 230 bool enable_ping_based_connection_checking_; | 232 bool enable_ping_based_connection_checking_; |
| 231 size_t session_max_recv_window_size_; | 233 size_t session_max_recv_window_size_; |
| 232 size_t stream_max_recv_window_size_; | 234 const SettingsMap settings_; |
|
Ryan Hamilton
2016/12/27 22:32:43
nit: comment
Bence
2016/12/28 00:53:24
Done.
| |
| 233 TimeFunc time_func_; | 235 TimeFunc time_func_; |
| 234 ServerPushDelegate* push_delegate_; | 236 ServerPushDelegate* push_delegate_; |
| 235 | 237 |
| 236 // Determines if a proxy is a trusted SPDY proxy, which is allowed to push | 238 // Determines if a proxy is a trusted SPDY proxy, which is allowed to push |
| 237 // resources from origins that are different from those of their associated | 239 // resources from origins that are different from those of their associated |
| 238 // streams. May be nullptr. | 240 // streams. May be nullptr. |
| 239 ProxyDelegate* proxy_delegate_; | 241 ProxyDelegate* proxy_delegate_; |
| 240 | 242 |
| 241 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); | 243 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); |
| 242 }; | 244 }; |
| 243 | 245 |
| 244 } // namespace net | 246 } // namespace net |
| 245 | 247 |
| 246 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ | 248 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ |
| OLD | NEW |