OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chromeos/network/network_cert_migrator.h" | 5 #include "chromeos/network/network_cert_migrator.h" |
6 | 6 |
7 #include <cert.h> | 7 #include <cert.h> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 std::string* pem_key, | 124 std::string* pem_key, |
125 const base::ListValue** pem_property, | 125 const base::ListValue** pem_property, |
126 std::string* nickname, | 126 std::string* nickname, |
127 UMANetworkType* uma_type) { | 127 UMANetworkType* uma_type) { |
128 struct NssPem { | 128 struct NssPem { |
129 const char* read_prefix; | 129 const char* read_prefix; |
130 const char* nss_key; | 130 const char* nss_key; |
131 const char* pem_key; | 131 const char* pem_key; |
132 UMANetworkType uma_type; | 132 UMANetworkType uma_type; |
133 } const kNssPemMap[] = { | 133 } const kNssPemMap[] = { |
134 { NULL, flimflam::kEapCaCertNssProperty, shill::kEapCaCertPemProperty, | 134 { NULL, shill::kEapCaCertNssProperty, shill::kEapCaCertPemProperty, |
135 UMA_NETWORK_TYPE_EAP }, | 135 UMA_NETWORK_TYPE_EAP }, |
136 { flimflam::kProviderProperty, flimflam::kL2tpIpsecCaCertNssProperty, | 136 { shill::kProviderProperty, shill::kL2tpIpsecCaCertNssProperty, |
137 shill::kL2tpIpsecCaCertPemProperty, UMA_NETWORK_TYPE_IPSEC }, | 137 shill::kL2tpIpsecCaCertPemProperty, UMA_NETWORK_TYPE_IPSEC }, |
138 { flimflam::kProviderProperty, flimflam::kOpenVPNCaCertNSSProperty, | 138 { shill::kProviderProperty, shill::kOpenVPNCaCertNSSProperty, |
139 shill::kOpenVPNCaCertPemProperty, UMA_NETWORK_TYPE_OPENVPN }, | 139 shill::kOpenVPNCaCertPemProperty, UMA_NETWORK_TYPE_OPENVPN }, |
140 }; | 140 }; |
141 | 141 |
142 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNssPemMap); ++i) { | 142 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNssPemMap); ++i) { |
143 const base::DictionaryValue* dict = &shill_properties; | 143 const base::DictionaryValue* dict = &shill_properties; |
144 if (kNssPemMap[i].read_prefix) { | 144 if (kNssPemMap[i].read_prefix) { |
145 shill_properties.GetDictionaryWithoutPathExpansion( | 145 shill_properties.GetDictionaryWithoutPathExpansion( |
146 kNssPemMap[i].read_prefix, &dict); | 146 kNssPemMap[i].read_prefix, &dict); |
147 if (!dict) | 147 if (!dict) |
148 continue; | 148 continue; |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 void NetworkCertMigrator::OnCertificatesLoaded( | 269 void NetworkCertMigrator::OnCertificatesLoaded( |
270 const net::CertificateList& cert_list, | 270 const net::CertificateList& cert_list, |
271 bool initial_load) { | 271 bool initial_load) { |
272 // Maybe there are networks referring to certs (by NSS nickname) that were not | 272 // Maybe there are networks referring to certs (by NSS nickname) that were not |
273 // loaded before but are now. | 273 // loaded before but are now. |
274 NetworkListChanged(); | 274 NetworkListChanged(); |
275 } | 275 } |
276 | 276 |
277 } // namespace chromeos | 277 } // namespace chromeos |
OLD | NEW |