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/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 #endif | 96 #endif |
97 | 97 |
98 #if !defined(OS_IOS) && !defined(OS_ANDROID) | 98 #if !defined(OS_IOS) && !defined(OS_ANDROID) |
99 #include "net/proxy/proxy_resolver_v8.h" | 99 #include "net/proxy/proxy_resolver_v8.h" |
100 #endif | 100 #endif |
101 | 101 |
102 #if defined(OS_ANDROID) || defined(OS_IOS) | 102 #if defined(OS_ANDROID) || defined(OS_IOS) |
103 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h" | 103 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h" |
104 #endif | 104 #endif |
105 | 105 |
106 #if defined(OS_CHROMEOS) | |
107 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | |
108 #include "net/cert/multi_threaded_cert_verifier.h" | |
109 #endif | |
110 | |
106 using content::BrowserThread; | 111 using content::BrowserThread; |
107 | 112 |
108 class SafeBrowsingURLRequestContext; | 113 class SafeBrowsingURLRequestContext; |
109 | 114 |
110 // The IOThread object must outlive any tasks posted to the IO thread before the | 115 // The IOThread object must outlive any tasks posted to the IO thread before the |
111 // Quit task, so base::Bind() calls are not refcounted. | 116 // Quit task, so base::Bind() calls are not refcounted. |
112 | 117 |
113 namespace { | 118 namespace { |
114 | 119 |
115 const char kQuicFieldTrialName[] = "QUIC"; | 120 const char kQuicFieldTrialName[] = "QUIC"; |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
537 ChromeNetworkDelegate* network_delegate = | 542 ChromeNetworkDelegate* network_delegate = |
538 new ChromeNetworkDelegate(extension_event_router_forwarder_, | 543 new ChromeNetworkDelegate(extension_event_router_forwarder_, |
539 &system_enable_referrers_); | 544 &system_enable_referrers_); |
540 if (command_line.HasSwitch(switches::kEnableClientHints)) | 545 if (command_line.HasSwitch(switches::kEnableClientHints)) |
541 network_delegate->SetEnableClientHints(); | 546 network_delegate->SetEnableClientHints(); |
542 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) | 547 if (command_line.HasSwitch(switches::kDisableExtensionsHttpThrottling)) |
543 network_delegate->NeverThrottleRequests(); | 548 network_delegate->NeverThrottleRequests(); |
544 globals_->system_network_delegate.reset(network_delegate); | 549 globals_->system_network_delegate.reset(network_delegate); |
545 globals_->host_resolver = CreateGlobalHostResolver(net_log_); | 550 globals_->host_resolver = CreateGlobalHostResolver(net_log_); |
546 UpdateDnsClientEnabled(); | 551 UpdateDnsClientEnabled(); |
552 #if defined(OS_CHROMEOS) | |
553 // Creates a CertVerifyProc that doesn't allow any profile-provided certs. | |
554 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier( | |
555 new chromeos::CertVerifyProcChromeOS())); | |
556 #else | |
547 globals_->cert_verifier.reset(net::CertVerifier::CreateDefault()); | 557 globals_->cert_verifier.reset(net::CertVerifier::CreateDefault()); |
Ryan Sleevi
2014/01/30 05:27:40
I think you should update this to use MultiThreade
mattm
2014/02/04 05:31:21
Done.
| |
558 #endif | |
548 globals_->transport_security_state.reset(new net::TransportSecurityState()); | 559 globals_->transport_security_state.reset(new net::TransportSecurityState()); |
549 #if !defined(USE_OPENSSL) | 560 #if !defined(USE_OPENSSL) |
550 // For now, Certificate Transparency is only implemented for platforms | 561 // For now, Certificate Transparency is only implemented for platforms |
551 // that use NSS. | 562 // that use NSS. |
552 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); | 563 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); |
553 globals_->cert_transparency_verifier.reset(ct_verifier); | 564 globals_->cert_transparency_verifier.reset(ct_verifier); |
554 | 565 |
555 // Add built-in logs | 566 // Add built-in logs |
556 ct_verifier->AddLog(net::ct::CreateGooglePilotLogVerifier().Pass()); | 567 ct_verifier->AddLog(net::ct::CreateGooglePilotLogVerifier().Pass()); |
557 ct_verifier->AddLog(net::ct::CreateGoogleAviatorLogVerifier().Pass()); | 568 ct_verifier->AddLog(net::ct::CreateGoogleAviatorLogVerifier().Pass()); |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1151 std::string version_flag = | 1162 std::string version_flag = |
1152 command_line.GetSwitchValueASCII(switches::kQuicVersion); | 1163 command_line.GetSwitchValueASCII(switches::kQuicVersion); |
1153 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1164 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1154 net::QuicVersion version = supported_versions[i]; | 1165 net::QuicVersion version = supported_versions[i]; |
1155 if (net::QuicVersionToString(version) == version_flag) { | 1166 if (net::QuicVersionToString(version) == version_flag) { |
1156 return version; | 1167 return version; |
1157 } | 1168 } |
1158 } | 1169 } |
1159 return net::QUIC_VERSION_UNSUPPORTED; | 1170 return net::QUIC_VERSION_UNSUPPORTED; |
1160 } | 1171 } |
OLD | NEW |