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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 2753123002: Add --ignore-certificate-errors-spki-list switch and UMA histogram. (Closed)
Patch Set: Add --ignore-certificate-errors-spki-list switch and UMA histogram. Created 3 years, 7 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 | « chrome/browser/BUILD.gn ('k') | chrome/browser/ssl/ignore_errors_cert_verifier.h » ('j') | no next file with comments »
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 #include "chrome/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 22 matching lines...) Expand all
33 #include "base/trace_event/trace_event.h" 33 #include "base/trace_event/trace_event.h"
34 #include "build/build_config.h" 34 #include "build/build_config.h"
35 #include "chrome/browser/browser_process.h" 35 #include "chrome/browser/browser_process.h"
36 #include "chrome/browser/data_usage/tab_id_annotator.h" 36 #include "chrome/browser/data_usage/tab_id_annotator.h"
37 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h" 37 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h"
38 #include "chrome/browser/net/async_dns_field_trial.h" 38 #include "chrome/browser/net/async_dns_field_trial.h"
39 #include "chrome/browser/net/chrome_network_delegate.h" 39 #include "chrome/browser/net/chrome_network_delegate.h"
40 #include "chrome/browser/net/dns_probe_service.h" 40 #include "chrome/browser/net/dns_probe_service.h"
41 #include "chrome/browser/net/proxy_service_factory.h" 41 #include "chrome/browser/net/proxy_service_factory.h"
42 #include "chrome/browser/net/sth_distributor_provider.h" 42 #include "chrome/browser/net/sth_distributor_provider.h"
43 #include "chrome/browser/ssl/ignore_errors_cert_verifier.h"
43 #include "chrome/common/channel_info.h" 44 #include "chrome/common/channel_info.h"
44 #include "chrome/common/chrome_content_client.h" 45 #include "chrome/common/chrome_content_client.h"
45 #include "chrome/common/chrome_switches.h" 46 #include "chrome/common/chrome_switches.h"
46 #include "chrome/common/pref_names.h" 47 #include "chrome/common/pref_names.h"
47 #include "components/certificate_transparency/tree_state_tracker.h" 48 #include "components/certificate_transparency/tree_state_tracker.h"
48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" 49 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
49 #include "components/data_usage/core/data_use_aggregator.h" 50 #include "components/data_usage/core/data_use_aggregator.h"
50 #include "components/data_usage/core/data_use_amortizer.h" 51 #include "components/data_usage/core/data_use_amortizer.h"
51 #include "components/data_usage/core/data_use_annotator.h" 52 #include "components/data_usage/core/data_use_annotator.h"
52 #include "components/data_use_measurement/core/data_use_ascriber.h" 53 #include "components/data_use_measurement/core/data_use_ascriber.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 globals_->network_quality_observer = content::CreateNetworkQualityObserver( 604 globals_->network_quality_observer = content::CreateNetworkQualityObserver(
604 globals_->network_quality_estimator.get()); 605 globals_->network_quality_estimator.get());
605 606
606 UpdateDnsClientEnabled(); 607 UpdateDnsClientEnabled();
607 #if defined(OS_CHROMEOS) 608 #if defined(OS_CHROMEOS)
608 // Creates a CertVerifyProc that doesn't allow any profile-provided certs. 609 // Creates a CertVerifyProc that doesn't allow any profile-provided certs.
609 globals_->cert_verifier = base::MakeUnique<net::CachingCertVerifier>( 610 globals_->cert_verifier = base::MakeUnique<net::CachingCertVerifier>(
610 base::MakeUnique<net::MultiThreadedCertVerifier>( 611 base::MakeUnique<net::MultiThreadedCertVerifier>(
611 new chromeos::CertVerifyProcChromeOS())); 612 new chromeos::CertVerifyProcChromeOS()));
612 #else 613 #else
613 globals_->cert_verifier = net::CertVerifier::CreateDefault(); 614 globals_->cert_verifier = IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
615 command_line, net::CertVerifier::CreateDefault());
616 UMA_HISTOGRAM_BOOLEAN(
617 "Net.Certificate.IgnoreCertificateErrorsSPKIListPresent",
618 command_line.HasSwitch(switches::kIgnoreCertificateErrorsSPKIList));
614 #endif 619 #endif
615 620
616 globals_->transport_security_state.reset(new net::TransportSecurityState()); 621 globals_->transport_security_state.reset(new net::TransportSecurityState());
617 622
618 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs( 623 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs(
619 net::ct::CreateLogVerifiersForKnownLogs()); 624 net::ct::CreateLogVerifiersForKnownLogs());
620 625
621 globals_->ct_logs.assign(ct_logs.begin(), ct_logs.end()); 626 globals_->ct_logs.assign(ct_logs.begin(), ct_logs.end());
622 627
623 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); 628 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier();
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 1099
1095 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1100 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1096 // system URLRequestContext too. There's no reason this should be tied to a 1101 // system URLRequestContext too. There's no reason this should be tied to a
1097 // profile. 1102 // profile.
1098 return context; 1103 return context;
1099 } 1104 }
1100 1105
1101 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { 1106 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() {
1102 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); 1107 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread);
1103 } 1108 }
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/ssl/ignore_errors_cert_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698