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

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

Issue 2753123002: Add --ignore-certificate-errors-spki-list switch and UMA histogram. (Closed)
Patch Set: Move test for --user-data-dir into unittest; add bad flags prompt. 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
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 21 matching lines...) Expand all
32 #include "base/trace_event/trace_event.h" 32 #include "base/trace_event/trace_event.h"
33 #include "build/build_config.h" 33 #include "build/build_config.h"
34 #include "chrome/browser/browser_process.h" 34 #include "chrome/browser/browser_process.h"
35 #include "chrome/browser/data_usage/tab_id_annotator.h" 35 #include "chrome/browser/data_usage/tab_id_annotator.h"
36 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h" 36 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h"
37 #include "chrome/browser/net/async_dns_field_trial.h" 37 #include "chrome/browser/net/async_dns_field_trial.h"
38 #include "chrome/browser/net/chrome_network_delegate.h" 38 #include "chrome/browser/net/chrome_network_delegate.h"
39 #include "chrome/browser/net/dns_probe_service.h" 39 #include "chrome/browser/net/dns_probe_service.h"
40 #include "chrome/browser/net/proxy_service_factory.h" 40 #include "chrome/browser/net/proxy_service_factory.h"
41 #include "chrome/browser/net/sth_distributor_provider.h" 41 #include "chrome/browser/net/sth_distributor_provider.h"
42 #include "chrome/browser/ssl/ignore_errors_cert_verifier.h"
42 #include "chrome/common/channel_info.h" 43 #include "chrome/common/channel_info.h"
43 #include "chrome/common/chrome_content_client.h" 44 #include "chrome/common/chrome_content_client.h"
44 #include "chrome/common/chrome_switches.h" 45 #include "chrome/common/chrome_switches.h"
45 #include "chrome/common/pref_names.h" 46 #include "chrome/common/pref_names.h"
46 #include "components/certificate_transparency/tree_state_tracker.h" 47 #include "components/certificate_transparency/tree_state_tracker.h"
47 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" 48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
48 #include "components/data_usage/core/data_use_aggregator.h" 49 #include "components/data_usage/core/data_use_aggregator.h"
49 #include "components/data_usage/core/data_use_amortizer.h" 50 #include "components/data_usage/core/data_use_amortizer.h"
50 #include "components/data_usage/core/data_use_annotator.h" 51 #include "components/data_usage/core/data_use_annotator.h"
51 #include "components/data_use_measurement/core/data_use_ascriber.h" 52 #include "components/data_use_measurement/core/data_use_ascriber.h"
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 std::move(external_estimate_provider), network_quality_estimator_params, 585 std::move(external_estimate_provider), network_quality_estimator_params,
585 net_log_)); 586 net_log_));
586 587
587 UpdateDnsClientEnabled(); 588 UpdateDnsClientEnabled();
588 #if defined(OS_CHROMEOS) 589 #if defined(OS_CHROMEOS)
589 // Creates a CertVerifyProc that doesn't allow any profile-provided certs. 590 // Creates a CertVerifyProc that doesn't allow any profile-provided certs.
590 globals_->cert_verifier = base::MakeUnique<net::CachingCertVerifier>( 591 globals_->cert_verifier = base::MakeUnique<net::CachingCertVerifier>(
591 base::MakeUnique<net::MultiThreadedCertVerifier>( 592 base::MakeUnique<net::MultiThreadedCertVerifier>(
592 new chromeos::CertVerifyProcChromeOS())); 593 new chromeos::CertVerifyProcChromeOS()));
593 #else 594 #else
594 globals_->cert_verifier = net::CertVerifier::CreateDefault(); 595 globals_->cert_verifier = IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
596 command_line, net::CertVerifier::CreateDefault());
597 UMA_HISTOGRAM_BOOLEAN(
598 "Net.Certificate.IgnoreCertificateErrorsSPKIListPresent",
599 command_line.HasSwitch(switches::kIgnoreCertificateErrorsSPKIList));
595 #endif 600 #endif
596 601
597 globals_->transport_security_state.reset(new net::TransportSecurityState()); 602 globals_->transport_security_state.reset(new net::TransportSecurityState());
598 603
599 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs( 604 std::vector<scoped_refptr<const net::CTLogVerifier>> ct_logs(
600 net::ct::CreateLogVerifiersForKnownLogs()); 605 net::ct::CreateLogVerifiersForKnownLogs());
601 606
602 globals_->ct_logs.assign(ct_logs.begin(), ct_logs.end()); 607 globals_->ct_logs.assign(ct_logs.begin(), ct_logs.end());
603 608
604 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier(); 609 net::MultiLogCTVerifier* ct_verifier = new net::MultiLogCTVerifier();
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 1118
1114 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1119 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1115 // system URLRequestContext too. There's no reason this should be tied to a 1120 // system URLRequestContext too. There's no reason this should be tied to a
1116 // profile. 1121 // profile.
1117 return context; 1122 return context;
1118 } 1123 }
1119 1124
1120 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { 1125 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() {
1121 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); 1126 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread);
1122 } 1127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698