Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1138)

Side by Side Diff: net/spdy/spdy_session_pool.h

Issue 2521573006: Server push cancellation: change the ownership of ServerPushDelegate to HttpNetworkSession. (Closed)
Patch Set: address comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 net { 30 namespace net {
30 31
31 class AddressList; 32 class AddressList;
32 class ClientSocketHandle; 33 class ClientSocketHandle;
33 class HostResolver; 34 class HostResolver;
34 class HttpServerProperties; 35 class HttpServerProperties;
35 class NetLogWithSource; 36 class NetLogWithSource;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void UnregisterUnclaimedPushedStream(const GURL& url, 120 void UnregisterUnclaimedPushedStream(const GURL& url,
120 SpdySession* spdy_session); 121 SpdySession* spdy_session);
121 122
122 // Creates a Value summary of the state of the spdy session pool. 123 // Creates a Value summary of the state of the spdy session pool.
123 std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const; 124 std::unique_ptr<base::Value> SpdySessionPoolInfoToValue() const;
124 125
125 HttpServerProperties* http_server_properties() { 126 HttpServerProperties* http_server_properties() {
126 return http_server_properties_; 127 return http_server_properties_;
127 } 128 }
128 129
130 void set_server_push_delegate(ServerPushDelegate* push_delegate) {
131 push_delegate_ = push_delegate;
132 }
133
129 // NetworkChangeNotifier::IPAddressObserver methods: 134 // NetworkChangeNotifier::IPAddressObserver methods:
130 135
131 // We flush all idle sessions and release references to the active ones so 136 // We flush all idle sessions and release references to the active ones so
132 // they won't get re-used. The active ones will either complete successfully 137 // they won't get re-used. The active ones will either complete successfully
133 // or error out due to the IP address change. 138 // or error out due to the IP address change.
134 void OnIPAddressChanged() override; 139 void OnIPAddressChanged() override;
135 140
136 // SSLConfigService::Observer methods: 141 // SSLConfigService::Observer methods:
137 142
138 // We perform the same flushing as described above when SSL settings change. 143 // We perform the same flushing as described above when SSL settings change.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 216
212 const scoped_refptr<SSLConfigService> ssl_config_service_; 217 const scoped_refptr<SSLConfigService> ssl_config_service_;
213 HostResolver* const resolver_; 218 HostResolver* const resolver_;
214 219
215 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests. 220 // Defaults to true. May be controlled via SpdySessionPoolPeer for tests.
216 bool enable_sending_initial_data_; 221 bool enable_sending_initial_data_;
217 bool enable_ping_based_connection_checking_; 222 bool enable_ping_based_connection_checking_;
218 size_t session_max_recv_window_size_; 223 size_t session_max_recv_window_size_;
219 size_t stream_max_recv_window_size_; 224 size_t stream_max_recv_window_size_;
220 TimeFunc time_func_; 225 TimeFunc time_func_;
226 ServerPushDelegate* push_delegate_;
221 227
222 // Determines if a proxy is a trusted SPDY proxy, which is allowed to push 228 // Determines if a proxy is a trusted SPDY proxy, which is allowed to push
223 // resources from origins that are different from those of their associated 229 // resources from origins that are different from those of their associated
224 // streams. May be nullptr. 230 // streams. May be nullptr.
225 ProxyDelegate* proxy_delegate_; 231 ProxyDelegate* proxy_delegate_;
226 232
227 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool); 233 DISALLOW_COPY_AND_ASSIGN(SpdySessionPool);
228 }; 234 };
229 235
230 } // namespace net 236 } // namespace net
231 237
232 #endif // NET_SPDY_SPDY_SESSION_POOL_H_ 238 #endif // NET_SPDY_SPDY_SESSION_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698