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 <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
19 #include "net/base/ip_endpoint.h" | 19 #include "net/base/ip_endpoint.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 #include "net/base/net_export.h" | 21 #include "net/base/net_export.h" |
22 #include "net/base/network_change_notifier.h" | 22 #include "net/base/network_change_notifier.h" |
23 #include "net/cert/cert_database.h" | 23 #include "net/cert/cert_database.h" |
24 #include "net/proxy/proxy_config.h" | 24 #include "net/proxy/proxy_config.h" |
25 #include "net/proxy/proxy_server.h" | 25 #include "net/proxy/proxy_server.h" |
| 26 #include "net/spdy/server_push_delegate.h" |
26 #include "net/spdy/spdy_session_key.h" | 27 #include "net/spdy/spdy_session_key.h" |
27 #include "net/ssl/ssl_config_service.h" | 28 #include "net/ssl/ssl_config_service.h" |
28 | 29 |
29 namespace base { | 30 namespace base { |
30 namespace trace_event { | 31 namespace trace_event { |
31 class ProcessMemoryDump; | 32 class ProcessMemoryDump; |
32 } | 33 } |
33 } | 34 } |
34 | 35 |
35 namespace net { | 36 namespace net { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void UnregisterUnclaimedPushedStream(const GURL& url, | 125 void UnregisterUnclaimedPushedStream(const GURL& url, |
125 SpdySession* spdy_session); | 126 SpdySession* spdy_session); |
126 | 127 |
127 // Creates a Value summary of the state of the spdy session pool. | 128 // Creates a Value summary of the state of the spdy session pool. |
128 std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const; | 129 std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const; |
129 | 130 |
130 HttpServerProperties* http_server_properties() { | 131 HttpServerProperties* http_server_properties() { |
131 return http_server_properties_; | 132 return http_server_properties_; |
132 } | 133 } |
133 | 134 |
| 135 void set_server_push_delegate(ServerPushDelegate* push_delegate) { |
| 136 push_delegate_ = push_delegate; |
| 137 } |
| 138 |
134 // NetworkChangeNotifier::IPAddressObserver methods: | 139 // NetworkChangeNotifier::IPAddressObserver methods: |
135 | 140 |
136 // We flush all idle sessions and release references to the active ones so | 141 // We flush all idle sessions and release references to the active ones so |
137 // they won't get re-used. The active ones will either complete successfully | 142 // they won't get re-used. The active ones will either complete successfully |
138 // or error out due to the IP address change. | 143 // or error out due to the IP address change. |
139 void OnIPAddressChanged() override; | 144 void OnIPAddressChanged() override; |
140 | 145 |
141 // SSLConfigService::Observer methods: | 146 // SSLConfigService::Observer methods: |
142 | 147 |
143 // We perform the same flushing as described above when SSL settings change. | 148 // We perform the same flushing as described above when SSL settings change. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 224 |
220 const scoped_refptr<SSLConfigService> ssl_config_service_; | 225 const scoped_refptr<SSLConfigService> ssl_config_service_; |
221 HostResolver* const resolver_; | 226 HostResolver* const resolver_; |
222 | 227 |
223 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. | 228 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. |
224 bool enable_sending_initial_data_; | 229 bool enable_sending_initial_data_; |
225 bool enable_ping_based_connection_checking_; | 230 bool enable_ping_based_connection_checking_; |
226 size_t session_max_recv_window_size_; | 231 size_t session_max_recv_window_size_; |
227 size_t stream_max_recv_window_size_; | 232 size_t stream_max_recv_window_size_; |
228 TimeFunc time_func_; | 233 TimeFunc time_func_; |
| 234 ServerPushDelegate* push_delegate_; |
229 | 235 |
230 // Determines if a proxy is a trusted SPDY proxy, which is allowed to push | 236 // Determines if a proxy is a trusted SPDY proxy, which is allowed to push |
231 // resources from origins that are different from those of their associated | 237 // resources from origins that are different from those of their associated |
232 // streams. May be nullptr. | 238 // streams. May be nullptr. |
233 ProxyDelegate* proxy_delegate_; | 239 ProxyDelegate* proxy_delegate_; |
234 | 240 |
235 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); | 241 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); |
236 }; | 242 }; |
237 | 243 |
238 } // namespace net | 244 } // namespace net |
239 | 245 |
240 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ | 246 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ |
OLD | NEW |