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/vpn_config_view.h" | 5 #include "chrome/browser/chromeos/options/vpn_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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 int cert_index = index - 1; | 447 int cert_index = index - 1; |
448 return CertLibrary::Get()->GetServerCACertPEMAt(cert_index); | 448 return CertLibrary::Get()->GetServerCACertPEMAt(cert_index); |
449 } | 449 } |
450 } | 450 } |
451 | 451 |
452 void VPNConfigView::SetUserCertProperties( | 452 void VPNConfigView::SetUserCertProperties( |
453 chromeos::client_cert::ConfigType client_cert_type, | 453 chromeos::client_cert::ConfigType client_cert_type, |
454 base::DictionaryValue* properties) const { | 454 base::DictionaryValue* properties) const { |
455 if (!HaveUserCerts()) { | 455 if (!HaveUserCerts()) { |
456 // No certificate selected or not required. | 456 // No certificate selected or not required. |
457 chromeos::client_cert::SetEmptyShillProperties( | 457 chromeos::client_cert::SetEmptyShillProperties(client_cert_type, |
458 chromeos::client_cert::CONFIG_TYPE_EAP, properties); | 458 properties); |
459 } else { | 459 } else { |
460 // Certificates are listed in the order they appear in the model. | 460 // Certificates are listed in the order they appear in the model. |
461 int index = user_cert_combobox_ ? user_cert_combobox_->selected_index() : 0; | 461 int index = user_cert_combobox_ ? user_cert_combobox_->selected_index() : 0; |
462 int slot_id = -1; | 462 int slot_id = -1; |
463 const std::string pkcs11_id = | 463 const std::string pkcs11_id = |
464 CertLibrary::Get()->GetUserCertPkcs11IdAt(index, &slot_id); | 464 CertLibrary::Get()->GetUserCertPkcs11IdAt(index, &slot_id); |
465 chromeos::client_cert::SetShillProperties( | 465 chromeos::client_cert::SetShillProperties( |
466 client_cert_type, slot_id, pkcs11_id, properties); | 466 client_cert_type, slot_id, pkcs11_id, properties); |
467 } | 467 } |
468 } | 468 } |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1060 property_ui_data->ParseOncProperty( | 1060 property_ui_data->ParseOncProperty( |
1061 onc_source, | 1061 onc_source, |
1062 onc, | 1062 onc, |
1063 base::StringPrintf("%s.%s.%s", | 1063 base::StringPrintf("%s.%s.%s", |
1064 ::onc::network_config::kVPN, | 1064 ::onc::network_config::kVPN, |
1065 dict_key.c_str(), | 1065 dict_key.c_str(), |
1066 key.c_str())); | 1066 key.c_str())); |
1067 } | 1067 } |
1068 | 1068 |
1069 } // namespace chromeos | 1069 } // namespace chromeos |
OLD | NEW |