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 #include "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 new LoggingNetworkChangeObserver(net_log_)); | 504 new LoggingNetworkChangeObserver(net_log_)); |
505 | 505 |
506 // Setup the HistogramWatcher to run on the IO thread. | 506 // Setup the HistogramWatcher to run on the IO thread. |
507 net::NetworkChangeNotifier::InitHistogramWatcher(); | 507 net::NetworkChangeNotifier::InitHistogramWatcher(); |
508 | 508 |
509 globals_->extension_event_router_forwarder = | 509 globals_->extension_event_router_forwarder = |
510 extension_event_router_forwarder_; | 510 extension_event_router_forwarder_; |
511 ChromeNetworkDelegate* network_delegate = | 511 ChromeNetworkDelegate* network_delegate = |
512 new ChromeNetworkDelegate(extension_event_router_forwarder_, | 512 new ChromeNetworkDelegate(extension_event_router_forwarder_, |
513 &system_enable_referrers_); | 513 &system_enable_referrers_); |
| 514 if (command_line.HasSwitch(switches::kEnableClientHints)) |
| 515 network_delegate->SetEnableClientHints(); |
514 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) | 516 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) |
515 network_delegate->NeverThrottleRequests(); | 517 network_delegate->NeverThrottleRequests(); |
516 globals_->system_network_delegate.reset(network_delegate); | 518 globals_->system_network_delegate.reset(network_delegate); |
517 globals_->host_resolver = CreateGlobalHostResolver(net_log_); | 519 globals_->host_resolver = CreateGlobalHostResolver(net_log_); |
518 UpdateDnsClientEnabled(); | 520 UpdateDnsClientEnabled(); |
519 globals_->cert_verifier.reset(net::CertVerifier::CreateDefault()); | 521 globals_->cert_verifier.reset(net::CertVerifier::CreateDefault()); |
520 globals_->transport_security_state.reset(new net::TransportSecurityState()); | 522 globals_->transport_security_state.reset(new net::TransportSecurityState()); |
521 globals_->ssl_config_service = GetSSLConfigService(); | 523 globals_->ssl_config_service = GetSSLConfigService(); |
522 if (command_line.HasSwitch(switches::kSpdyProxyAuthOrigin)) { | 524 if (command_line.HasSwitch(switches::kSpdyProxyAuthOrigin)) { |
523 spdyproxy_auth_origin_ = | 525 spdyproxy_auth_origin_ = |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 if (command_line.HasSwitch(switches::kDisableQuicHttps)) | 1021 if (command_line.HasSwitch(switches::kDisableQuicHttps)) |
1020 return false; | 1022 return false; |
1021 | 1023 |
1022 if (command_line.HasSwitch(switches::kEnableQuicHttps)) | 1024 if (command_line.HasSwitch(switches::kEnableQuicHttps)) |
1023 return true; | 1025 return true; |
1024 | 1026 |
1025 // HTTPS over QUIC should only be enabled if we are in the https | 1027 // HTTPS over QUIC should only be enabled if we are in the https |
1026 // field trial group. | 1028 // field trial group. |
1027 return quic_trial_group == kQuicFieldTrialHttpsEnabledGroupName; | 1029 return quic_trial_group == kQuicFieldTrialHttpsEnabledGroupName; |
1028 } | 1030 } |
OLD | NEW |