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

Unified Diff: chrome/browser/io_thread.cc

Issue 2753123002: Add --ignore-certificate-errors-spki-list switch and UMA histogram. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/io_thread_unittest.cc » ('j') | content/public/common/content_switches.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 11a0084276f89521e4aac2d0632c93fdf5ad31ba..6b656aa78845c0e3cbcc798a5abe4566014c23eb 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -1024,6 +1024,17 @@ void IOThread::ConfigureParamsFromFieldTrialsAndCommandLine(
if (command_line.HasSwitch(switches::kEnableUserAlternateProtocolPorts)) {
params->enable_user_alternate_protocol_ports = true;
}
+ if (command_line.HasSwitch(switches::kIgnoreCertificateErrorsSPKIList)) {
+ std::string spki_list = command_line.GetSwitchValueASCII(
+ switches::kIgnoreCertificateErrorsSPKIList);
+ for (const std::string& spki : base::SplitString(
+ spki_list, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
+ params->ignore_certificate_error_spki_list.insert(spki);
Ryan Sleevi 2017/03/16 23:19:13 Should we validate this is parsable/correct? I'm j
martinkr 2017/03/28 23:16:02 I don't feel strongly about it either way, but mak
+ }
+ }
+ UMA_HISTOGRAM_BOOLEAN(
+ "Net.Certificate.kIgnoreCertificateErrorsSPKIList",
+ command_line.HasSwitch(switches::kIgnoreCertificateErrorsSPKIList));
if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) {
params->ignore_certificate_errors = true;
}
« no previous file with comments | « no previous file | chrome/browser/io_thread_unittest.cc » ('j') | content/public/common/content_switches.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698