Index: chrome/browser/chromeos/cros/onc_network_parser.cc |
diff --git a/chrome/browser/chromeos/cros/onc_network_parser.cc b/chrome/browser/chromeos/cros/onc_network_parser.cc |
index 86083ee84340bd60b8516ca03080346dc216b816..5207fc5914ef9412bd60552c16c86740d187b9ef 100644 |
--- a/chrome/browser/chromeos/cros/onc_network_parser.cc |
+++ b/chrome/browser/chromeos/cros/onc_network_parser.cc |
@@ -1379,6 +1379,11 @@ bool OncNetworkParser::ParseClientCertPattern(OncNetworkParser* parser, |
PropertyIndex index, |
const base::Value& value, |
Network* network) { |
+ // Ignore certificate patterns for device policy ONC so that an unmanaged user |
+ // won't have a certificate presented for them involuntarily. |
+ if (parser->onc_source() == NetworkUIData::ONC_SOURCE_DEVICE_POLICY) |
+ return false; |
+ |
// Only WiFi and VPN have this type. |
if (network->type() != TYPE_WIFI && |
network->type() != TYPE_VPN) { |
@@ -1387,6 +1392,7 @@ bool OncNetworkParser::ParseClientCertPattern(OncNetworkParser* parser, |
return false; |
} |
+ |
switch (index) { |
case PROPERTY_INDEX_ONC_CERTIFICATE_PATTERN_ENROLLMENT_URI: { |
std::vector<std::string> resulting_list; |