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

Side by Side Diff: net/http/http_network_session.h

Issue 1580583002: Add a whitelist for QUIC hosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 4 years, 11 months 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
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | net/http/http_stream_factory_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_HTTP_HTTP_NETWORK_SESSION_H_ 5 #ifndef NET_HTTP_HTTP_NETWORK_SESSION_H_
6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_ 6 #define NET_HTTP_HTTP_NETWORK_SESSION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <unordered_set>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
16 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
17 #include "base/threading/non_thread_safe.h" 18 #include "base/threading/non_thread_safe.h"
18 #include "net/base/host_port_pair.h" 19 #include "net/base/host_port_pair.h"
19 #include "net/base/net_export.h" 20 #include "net/base/net_export.h"
20 #include "net/dns/host_resolver.h" 21 #include "net/dns/host_resolver.h"
21 #include "net/http/http_auth_cache.h" 22 #include "net/http/http_auth_cache.h"
22 #include "net/http/http_stream_factory.h" 23 #include "net/http/http_stream_factory.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 int quic_threshold_public_resets_post_handshake; 175 int quic_threshold_public_resets_post_handshake;
175 int quic_threshold_timeouts_streams_open; 176 int quic_threshold_timeouts_streams_open;
176 // Set of QUIC tags to send in the handshake's connection options. 177 // Set of QUIC tags to send in the handshake's connection options.
177 QuicTagVector quic_connection_options; 178 QuicTagVector quic_connection_options;
178 // If true, all QUIC sessions are closed when any local IP address changes. 179 // If true, all QUIC sessions are closed when any local IP address changes.
179 bool quic_close_sessions_on_ip_change; 180 bool quic_close_sessions_on_ip_change;
180 // Specifes QUIC idle connection state lifetime. 181 // Specifes QUIC idle connection state lifetime.
181 int quic_idle_connection_timeout_seconds; 182 int quic_idle_connection_timeout_seconds;
182 // If true, disable preconnections if QUIC can do 0RTT. 183 // If true, disable preconnections if QUIC can do 0RTT.
183 bool quic_disable_preconnect_if_0rtt; 184 bool quic_disable_preconnect_if_0rtt;
185 // List of hosts for which QUIC is explicitly whitelisted.
186 std::unordered_set<std::string> quic_host_whitelist;
187
184 ProxyDelegate* proxy_delegate; 188 ProxyDelegate* proxy_delegate;
185 }; 189 };
186 190
187 enum SocketPoolType { 191 enum SocketPoolType {
188 NORMAL_SOCKET_POOL, 192 NORMAL_SOCKET_POOL,
189 WEBSOCKET_SOCKET_POOL, 193 WEBSOCKET_SOCKET_POOL,
190 NUM_SOCKET_POOL_TYPES 194 NUM_SOCKET_POOL_TYPES
191 }; 195 };
192 196
193 explicit HttpNetworkSession(const Params& params); 197 explicit HttpNetworkSession(const Params& params);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 297
294 NextProtoVector next_protos_; 298 NextProtoVector next_protos_;
295 bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS]; 299 bool enabled_protocols_[NUM_VALID_ALTERNATE_PROTOCOLS];
296 300
297 Params params_; 301 Params params_;
298 }; 302 };
299 303
300 } // namespace net 304 } // namespace net
301 305
302 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_ 306 #endif // NET_HTTP_HTTP_NETWORK_SESSION_H_
OLDNEW
« no previous file with comments | « components/cronet/url_request_context_config.cc ('k') | net/http/http_stream_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698