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/chromeos/options/wifi_config_view.h" | 5 #include "chrome/browser/chromeos/options/wifi_config_view.h" |
6 | 6 |
7 #include "ash/system/chromeos/network/network_connect.h" | 7 #include "ash/system/chromeos/network/network_connect.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 server_ca_cert_combobox_->SetSelectedIndex(0); | 1286 server_ca_cert_combobox_->SetSelectedIndex(0); |
1287 } | 1287 } |
1288 } | 1288 } |
1289 } | 1289 } |
1290 | 1290 |
1291 // User certificate. | 1291 // User certificate. |
1292 if (UserCertActive()) { | 1292 if (UserCertActive()) { |
1293 std::string eap_cert_id; | 1293 std::string eap_cert_id; |
1294 properties.GetStringWithoutPathExpansion( | 1294 properties.GetStringWithoutPathExpansion( |
1295 shill::kEapCertIdProperty, &eap_cert_id); | 1295 shill::kEapCertIdProperty, &eap_cert_id); |
1296 std::string pkcs11_id = client_cert::GetPkcs11IdFromEapCertId(eap_cert_id); | 1296 int unused_slot_id = 0; |
| 1297 std::string pkcs11_id = client_cert::GetPkcs11AndSlotIdFromEapCertId( |
| 1298 eap_cert_id, &unused_slot_id); |
1297 if (!pkcs11_id.empty()) { | 1299 if (!pkcs11_id.empty()) { |
1298 int cert_index = | 1300 int cert_index = |
1299 CertLibrary::Get()->GetUserCertIndexByPkcs11Id(pkcs11_id); | 1301 CertLibrary::Get()->GetUserCertIndexByPkcs11Id(pkcs11_id); |
1300 if (cert_index >= 0) | 1302 if (cert_index >= 0) |
1301 user_cert_combobox_->SetSelectedIndex(cert_index); | 1303 user_cert_combobox_->SetSelectedIndex(cert_index); |
1302 } | 1304 } |
1303 } | 1305 } |
1304 | 1306 |
1305 // Identity is always active. | 1307 // Identity is always active. |
1306 std::string eap_identity; | 1308 std::string eap_identity; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, | 1376 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
1375 const NetworkState* network, | 1377 const NetworkState* network, |
1376 const std::string& key) { | 1378 const std::string& key) { |
1377 std::string onc_tag = network->type() == shill::kTypeEthernet | 1379 std::string onc_tag = network->type() == shill::kTypeEthernet |
1378 ? ::onc::ethernet::kEAP | 1380 ? ::onc::ethernet::kEAP |
1379 : ::onc::wifi::kEAP; | 1381 : ::onc::wifi::kEAP; |
1380 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); | 1382 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); |
1381 } | 1383 } |
1382 | 1384 |
1383 } // namespace chromeos | 1385 } // namespace chromeos |
OLD | NEW |