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 <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1017 if (!quic_origin.IsEmpty()) | 1017 if (!quic_origin.IsEmpty()) |
1018 params->origins_to_force_quic_on.insert(quic_origin); | 1018 params->origins_to_force_quic_on.insert(quic_origin); |
1019 } | 1019 } |
1020 } | 1020 } |
1021 } | 1021 } |
1022 | 1022 |
1023 // Parameters only controlled by command line. | 1023 // Parameters only controlled by command line. |
1024 if (command_line.HasSwitch(switches::kEnableUserAlternateProtocolPorts)) { | 1024 if (command_line.HasSwitch(switches::kEnableUserAlternateProtocolPorts)) { |
1025 params->enable_user_alternate_protocol_ports = true; | 1025 params->enable_user_alternate_protocol_ports = true; |
1026 } | 1026 } |
1027 if (command_line.HasSwitch(switches::kIgnoreCertificateErrorsSPKIList)) { | |
1028 std::string spki_list = command_line.GetSwitchValueASCII( | |
1029 switches::kIgnoreCertificateErrorsSPKIList); | |
1030 for (const std::string& spki : base::SplitString( | |
1031 spki_list, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { | |
1032 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
| |
1033 } | |
1034 } | |
1035 UMA_HISTOGRAM_BOOLEAN( | |
1036 "Net.Certificate.kIgnoreCertificateErrorsSPKIList", | |
1037 command_line.HasSwitch(switches::kIgnoreCertificateErrorsSPKIList)); | |
1027 if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) { | 1038 if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) { |
1028 params->ignore_certificate_errors = true; | 1039 params->ignore_certificate_errors = true; |
1029 } | 1040 } |
1030 UMA_HISTOGRAM_BOOLEAN( | 1041 UMA_HISTOGRAM_BOOLEAN( |
1031 "Net.Certificate.IgnoreErrors", | 1042 "Net.Certificate.IgnoreErrors", |
1032 command_line.HasSwitch(switches::kIgnoreCertificateErrors)); | 1043 command_line.HasSwitch(switches::kIgnoreCertificateErrors)); |
1033 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { | 1044 if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { |
1034 params->testing_fixed_http_port = | 1045 params->testing_fixed_http_port = |
1035 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpPort); | 1046 GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpPort); |
1036 } | 1047 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1112 | 1123 |
1113 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1124 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1114 // system URLRequestContext too. There's no reason this should be tied to a | 1125 // system URLRequestContext too. There's no reason this should be tied to a |
1115 // profile. | 1126 // profile. |
1116 return context; | 1127 return context; |
1117 } | 1128 } |
1118 | 1129 |
1119 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { | 1130 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { |
1120 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); | 1131 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); |
1121 } | 1132 } |
OLD | NEW |