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/bind.h" | 10 #include "base/bind.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 UMANetworkType uma_type; | 203 UMANetworkType uma_type; |
204 } const kNssPemMap[] = { | 204 } const kNssPemMap[] = { |
205 { NULL, shill::kEapCaCertNssProperty, shill::kEapCaCertPemProperty, | 205 { NULL, shill::kEapCaCertNssProperty, shill::kEapCaCertPemProperty, |
206 UMA_NETWORK_TYPE_EAP }, | 206 UMA_NETWORK_TYPE_EAP }, |
207 { shill::kProviderProperty, shill::kL2tpIpsecCaCertNssProperty, | 207 { shill::kProviderProperty, shill::kL2tpIpsecCaCertNssProperty, |
208 shill::kL2tpIpsecCaCertPemProperty, UMA_NETWORK_TYPE_IPSEC }, | 208 shill::kL2tpIpsecCaCertPemProperty, UMA_NETWORK_TYPE_IPSEC }, |
209 { shill::kProviderProperty, shill::kOpenVPNCaCertNSSProperty, | 209 { shill::kProviderProperty, shill::kOpenVPNCaCertNSSProperty, |
210 shill::kOpenVPNCaCertPemProperty, UMA_NETWORK_TYPE_OPENVPN }, | 210 shill::kOpenVPNCaCertPemProperty, UMA_NETWORK_TYPE_OPENVPN }, |
211 }; | 211 }; |
212 | 212 |
213 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kNssPemMap); ++i) { | 213 for (size_t i = 0; i < arraysize(kNssPemMap); ++i) { |
214 const base::DictionaryValue* dict = &shill_properties; | 214 const base::DictionaryValue* dict = &shill_properties; |
215 if (kNssPemMap[i].read_prefix) { | 215 if (kNssPemMap[i].read_prefix) { |
216 shill_properties.GetDictionaryWithoutPathExpansion( | 216 shill_properties.GetDictionaryWithoutPathExpansion( |
217 kNssPemMap[i].read_prefix, &dict); | 217 kNssPemMap[i].read_prefix, &dict); |
218 if (!dict) | 218 if (!dict) |
219 continue; | 219 continue; |
220 } | 220 } |
221 dict->GetStringWithoutPathExpansion(kNssPemMap[i].nss_key, nickname); | 221 dict->GetStringWithoutPathExpansion(kNssPemMap[i].nss_key, nickname); |
222 if (!nickname->empty()) { | 222 if (!nickname->empty()) { |
223 *nss_key = kNssPemMap[i].nss_key; | 223 *nss_key = kNssPemMap[i].nss_key; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 | 352 |
353 void NetworkCertMigrator::OnCertificatesLoaded( | 353 void NetworkCertMigrator::OnCertificatesLoaded( |
354 const net::CertificateList& cert_list, | 354 const net::CertificateList& cert_list, |
355 bool initial_load) { | 355 bool initial_load) { |
356 // Maybe there are networks referring to certs that were not loaded before but | 356 // Maybe there are networks referring to certs that were not loaded before but |
357 // are now. | 357 // are now. |
358 NetworkListChanged(); | 358 NetworkListChanged(); |
359 } | 359 } |
360 | 360 |
361 } // namespace chromeos | 361 } // namespace chromeos |
OLD | NEW |