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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 new LoggingNetworkChangeObserver(net_log_)); | 466 new LoggingNetworkChangeObserver(net_log_)); |
467 | 467 |
468 // Setup the HistogramWatcher to run on the IO thread. | 468 // Setup the HistogramWatcher to run on the IO thread. |
469 net::NetworkChangeNotifier::InitHistogramWatcher(); | 469 net::NetworkChangeNotifier::InitHistogramWatcher(); |
470 | 470 |
471 globals_->extension_event_router_forwarder = | 471 globals_->extension_event_router_forwarder = |
472 extension_event_router_forwarder_; | 472 extension_event_router_forwarder_; |
473 ChromeNetworkDelegate* network_delegate = | 473 ChromeNetworkDelegate* network_delegate = |
474 new ChromeNetworkDelegate(extension_event_router_forwarder_, | 474 new ChromeNetworkDelegate(extension_event_router_forwarder_, |
475 &system_enable_referrers_); | 475 &system_enable_referrers_); |
| 476 if (command_line.HasSwitch(switches::kEnableClientHints)) |
| 477 network_delegate->set_enable_client_hints(); |
476 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) | 478 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) |
477 network_delegate->NeverThrottleRequests(); | 479 network_delegate->NeverThrottleRequests(); |
478 globals_->system_network_delegate.reset(network_delegate); | 480 globals_->system_network_delegate.reset(network_delegate); |
479 globals_->host_resolver = CreateGlobalHostResolver(net_log_); | 481 globals_->host_resolver = CreateGlobalHostResolver(net_log_); |
480 UpdateDnsClientEnabled(); | 482 UpdateDnsClientEnabled(); |
481 globals_->cert_verifier.reset(net::CertVerifier::CreateDefault()); | 483 globals_->cert_verifier.reset(net::CertVerifier::CreateDefault()); |
482 globals_->transport_security_state.reset(new net::TransportSecurityState()); | 484 globals_->transport_security_state.reset(new net::TransportSecurityState()); |
483 globals_->ssl_config_service = GetSSLConfigService(); | 485 globals_->ssl_config_service = GetSSLConfigService(); |
484 if (command_line.HasSwitch(switches::kSpdyProxyAuthOrigin)) { | 486 if (command_line.HasSwitch(switches::kSpdyProxyAuthOrigin)) { |
485 spdyproxy_auth_origin_ = | 487 spdyproxy_auth_origin_ = |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 globals_->system_request_context.reset( | 904 globals_->system_request_context.reset( |
903 ConstructSystemRequestContext(globals_, net_log_)); | 905 ConstructSystemRequestContext(globals_, net_log_)); |
904 | 906 |
905 sdch_manager_->set_sdch_fetcher( | 907 sdch_manager_->set_sdch_fetcher( |
906 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); | 908 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); |
907 } | 909 } |
908 | 910 |
909 void IOThread::UpdateDnsClientEnabled() { | 911 void IOThread::UpdateDnsClientEnabled() { |
910 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); | 912 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); |
911 } | 913 } |
OLD | NEW |