| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_para
ms.h" | 45 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_para
ms.h" |
| 46 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" | 46 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" |
| 47 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prot
ocol.h" | 47 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prot
ocol.h" |
| 48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" | 48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" |
| 49 #include "components/policy/core/common/policy_service.h" | 49 #include "components/policy/core/common/policy_service.h" |
| 50 #include "components/variations/variations_associated_data.h" | 50 #include "components/variations/variations_associated_data.h" |
| 51 #include "content/public/browser/browser_thread.h" | 51 #include "content/public/browser/browser_thread.h" |
| 52 #include "content/public/browser/cookie_store_factory.h" | 52 #include "content/public/browser/cookie_store_factory.h" |
| 53 #include "net/base/host_mapping_rules.h" | 53 #include "net/base/host_mapping_rules.h" |
| 54 #include "net/base/net_util.h" | 54 #include "net/base/net_util.h" |
| 55 #include "net/cert/cert_policy_enforcer.h" |
| 55 #include "net/cert/cert_verifier.h" | 56 #include "net/cert/cert_verifier.h" |
| 56 #include "net/cert/cert_verify_proc.h" | 57 #include "net/cert/cert_verify_proc.h" |
| 57 #include "net/cert/ct_known_logs.h" | 58 #include "net/cert/ct_known_logs.h" |
| 58 #include "net/cert/ct_log_verifier.h" | 59 #include "net/cert/ct_log_verifier.h" |
| 59 #include "net/cert/ct_verifier.h" | 60 #include "net/cert/ct_verifier.h" |
| 60 #include "net/cert/multi_log_ct_verifier.h" | 61 #include "net/cert/multi_log_ct_verifier.h" |
| 61 #include "net/cert/multi_threaded_cert_verifier.h" | 62 #include "net/cert/multi_threaded_cert_verifier.h" |
| 62 #include "net/cookies/cookie_store.h" | 63 #include "net/cookies/cookie_store.h" |
| 63 #include "net/dns/host_cache.h" | 64 #include "net/dns/host_cache.h" |
| 64 #include "net/dns/host_resolver.h" | 65 #include "net/dns/host_resolver.h" |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 #else | 593 #else |
| 593 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier( | 594 globals_->cert_verifier.reset(new net::MultiThreadedCertVerifier( |
| 594 net::CertVerifyProc::CreateDefault())); | 595 net::CertVerifyProc::CreateDefault())); |
| 595 #endif | 596 #endif |
| 596 | 597 |
| 597 globals_->transport_security_state.reset(new net::TransportSecurityState()); | 598 globals_->transport_security_state.reset(new net::TransportSecurityState()); |
| 598 | 599 |
| 599 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); | 600 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); |
| 600 globals_->cert_transparency_verifier.reset(ct_verifier); | 601 globals_->cert_transparency_verifier.reset(ct_verifier); |
| 601 | 602 |
| 603 if (command_line.HasSwitch(switches::kRequireCTForEV)) { |
| 604 net::CertPolicyEnforcer::SetEnforceCTEVPolicy(true); |
| 605 } |
| 606 |
| 602 // Add built-in logs | 607 // Add built-in logs |
| 603 ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs()); | 608 ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs()); |
| 604 | 609 |
| 605 // Add logs from command line | 610 // Add logs from command line |
| 606 if (command_line.HasSwitch(switches::kCertificateTransparencyLog)) { | 611 if (command_line.HasSwitch(switches::kCertificateTransparencyLog)) { |
| 607 std::string switch_value = command_line.GetSwitchValueASCII( | 612 std::string switch_value = command_line.GetSwitchValueASCII( |
| 608 switches::kCertificateTransparencyLog); | 613 switches::kCertificateTransparencyLog); |
| 609 std::vector<std::string> logs; | 614 std::vector<std::string> logs; |
| 610 base::SplitString(switch_value, ',', &logs); | 615 base::SplitString(switch_value, ',', &logs); |
| 611 for (std::vector<std::string>::iterator it = logs.begin(); it != logs.end(); | 616 for (std::vector<std::string>::iterator it = logs.begin(); it != logs.end(); |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1416 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1412 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1417 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1413 net::QuicVersion version = supported_versions[i]; | 1418 net::QuicVersion version = supported_versions[i]; |
| 1414 if (net::QuicVersionToString(version) == quic_version) { | 1419 if (net::QuicVersionToString(version) == quic_version) { |
| 1415 return version; | 1420 return version; |
| 1416 } | 1421 } |
| 1417 } | 1422 } |
| 1418 | 1423 |
| 1419 return net::QUIC_VERSION_UNSUPPORTED; | 1424 return net::QUIC_VERSION_UNSUPPORTED; |
| 1420 } | 1425 } |
| OLD | NEW |