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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index f6de3ee93b3e8a8a4229e8b3066424795d7e5e9b..1170e72a778fd4b171b4c33531c4b25b26e63837 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -39,6 +39,7 @@
#include "chrome/browser/net/dns_probe_service.h"
#include "chrome/browser/net/proxy_service_factory.h"
#include "chrome/browser/net/sth_distributor_provider.h"
+#include "chrome/browser/ssl/ignore_errors_cert_verifier.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_content_client.h"
#include "chrome/common/chrome_switches.h"
@@ -591,7 +592,11 @@ void IOThread::Init() {
base::MakeUnique<net::MultiThreadedCertVerifier>(
new chromeos::CertVerifyProcChromeOS()));
#else
- globals_->cert_verifier = net::CertVerifier::CreateDefault();
+ globals_->cert_verifier = IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
+ command_line, net::CertVerifier::CreateDefault());
+ UMA_HISTOGRAM_BOOLEAN(
+ "Net.Certificate.IgnoreCertificateErrorsSPKIListPresent",
+ command_line.HasSwitch(switches::kIgnoreCertificateErrorsSPKIList));
#endif
globals_->transport_security_state.reset(new net::TransportSecurityState());

Powered by Google App Engine
This is Rietveld 408576698