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

Side by Side Diff: chrome/browser/io_thread.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 | « no previous file | chrome/browser/io_thread.cc » ('j') | net/http/http_stream_factory_impl.cc » ('J')
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 CHROME_BROWSER_IO_THREAD_H_ 5 #ifndef CHROME_BROWSER_IO_THREAD_H_
6 #define CHROME_BROWSER_IO_THREAD_H_ 6 #define CHROME_BROWSER_IO_THREAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 Optional<int> quic_socket_receive_buffer_size; 232 Optional<int> quic_socket_receive_buffer_size;
233 Optional<bool> quic_delay_tcp_race; 233 Optional<bool> quic_delay_tcp_race;
234 Optional<size_t> quic_max_packet_length; 234 Optional<size_t> quic_max_packet_length;
235 net::QuicTagVector quic_connection_options; 235 net::QuicTagVector quic_connection_options;
236 Optional<std::string> quic_user_agent_id; 236 Optional<std::string> quic_user_agent_id;
237 Optional<net::QuicVersionVector> quic_supported_versions; 237 Optional<net::QuicVersionVector> quic_supported_versions;
238 Optional<net::HostPortPair> origin_to_force_quic_on; 238 Optional<net::HostPortPair> origin_to_force_quic_on;
239 Optional<bool> quic_close_sessions_on_ip_change; 239 Optional<bool> quic_close_sessions_on_ip_change;
240 Optional<int> quic_idle_connection_timeout_seconds; 240 Optional<int> quic_idle_connection_timeout_seconds;
241 Optional<bool> quic_disable_preconnect_if_0rtt; 241 Optional<bool> quic_disable_preconnect_if_0rtt;
242 std::vector<std::string> quic_host_whitelist;
242 bool enable_user_alternate_protocol_ports; 243 bool enable_user_alternate_protocol_ports;
243 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a 244 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a
244 // main frame load fails with a DNS error in order to provide more useful 245 // main frame load fails with a DNS error in order to provide more useful
245 // information to the renderer so it can show a more specific error page. 246 // information to the renderer so it can show a more specific error page.
246 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; 247 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service;
247 }; 248 };
248 249
249 // |net_log| must either outlive the IOThread or be NULL. 250 // |net_log| must either outlive the IOThread or be NULL.
250 IOThread(PrefService* local_state, 251 IOThread(PrefService* local_state,
251 policy::PolicyService* policy_service, 252 policy::PolicyService* policy_service,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // Returns the idle connection timeout for QUIC connections. Returns 0 if 455 // Returns the idle connection timeout for QUIC connections. Returns 0 if
455 // there is an error parsing any of the options, or if the default value 456 // there is an error parsing any of the options, or if the default value
456 // should be used. 457 // should be used.
457 static int GetQuicIdleConnectionTimeoutSeconds( 458 static int GetQuicIdleConnectionTimeoutSeconds(
458 const VariationParameters& quic_trial_params); 459 const VariationParameters& quic_trial_params);
459 460
460 // Returns true if PreConnect should be disabled if QUIC can do 0RTT. 461 // Returns true if PreConnect should be disabled if QUIC can do 0RTT.
461 static bool ShouldQuicDisablePreConnectIfZeroRtt( 462 static bool ShouldQuicDisablePreConnectIfZeroRtt(
462 const VariationParameters& quic_trial_params); 463 const VariationParameters& quic_trial_params);
463 464
465 // Returns the set of hosts to whitelist for QUIC.
466 static std::vector<std::string> GetQuicHostWhitelist(
467 const base::CommandLine& command_line,
468 const VariationParameters& quic_trial_params);
469
464 // Returns the maximum length for QUIC packets, based on any flags in 470 // Returns the maximum length for QUIC packets, based on any flags in
465 // |command_line| or the field trial. Returns 0 if there is an error 471 // |command_line| or the field trial. Returns 0 if there is an error
466 // parsing any of the options, or if the default value should be used. 472 // parsing any of the options, or if the default value should be used.
467 static size_t GetQuicMaxPacketLength( 473 static size_t GetQuicMaxPacketLength(
468 const base::CommandLine& command_line, 474 const base::CommandLine& command_line,
469 const VariationParameters& quic_trial_params); 475 const VariationParameters& quic_trial_params);
470 476
471 // Returns the QUIC versions specified by any flags in |command_line| 477 // Returns the QUIC versions specified by any flags in |command_line|
472 // or |quic_trial_params|. 478 // or |quic_trial_params|.
473 static net::QuicVersion GetQuicVersion( 479 static net::QuicVersion GetQuicVersion(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 bool is_quic_allowed_by_policy_; 576 bool is_quic_allowed_by_policy_;
571 577
572 const base::TimeTicks creation_time_; 578 const base::TimeTicks creation_time_;
573 579
574 base::WeakPtrFactory<IOThread> weak_factory_; 580 base::WeakPtrFactory<IOThread> weak_factory_;
575 581
576 DISALLOW_COPY_AND_ASSIGN(IOThread); 582 DISALLOW_COPY_AND_ASSIGN(IOThread);
577 }; 583 };
578 584
579 #endif // CHROME_BROWSER_IO_THREAD_H_ 585 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | net/http/http_stream_factory_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698