Chromium Code Reviews| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 bool WifiConfigView::HaveUserCerts() const { | 438 bool WifiConfigView::HaveUserCerts() const { |
| 439 return CertLibrary::Get()->NumCertificates(CertLibrary::CERT_TYPE_USER) > 0; | 439 return CertLibrary::Get()->NumCertificates(CertLibrary::CERT_TYPE_USER) > 0; |
| 440 } | 440 } |
| 441 | 441 |
| 442 bool WifiConfigView::IsUserCertValid() const { | 442 bool WifiConfigView::IsUserCertValid() const { |
| 443 if (!UserCertActive()) | 443 if (!UserCertActive()) |
| 444 return false; | 444 return false; |
| 445 int index = user_cert_combobox_->selected_index(); | 445 int index = user_cert_combobox_->selected_index(); |
| 446 if (index < 0) | 446 if (index < 0) |
| 447 return false; | 447 return false; |
| 448 // Currently only hardware-backed user certificates are valid. | 448 // Currently only hardware-backed user certificates are valid. |
|
stevenjb
2016/11/08 20:09:37
Update comment.
Kevin Cernekee
2016/11/08 21:00:41
Done.
| |
| 449 if (!CertLibrary::Get()->IsCertHardwareBackedAt(CertLibrary::CERT_TYPE_USER, | 449 if (!CertLibrary::Get()->IsCertSecureAt(CertLibrary::CERT_TYPE_USER, index)) { |
| 450 index)) { | |
| 451 return false; | 450 return false; |
| 452 } | 451 } |
| 453 return true; | 452 return true; |
| 454 } | 453 } |
| 455 | 454 |
| 456 bool WifiConfigView::Phase2AuthActive() const { | 455 bool WifiConfigView::Phase2AuthActive() const { |
| 457 if (phase_2_auth_combobox_) | 456 if (phase_2_auth_combobox_) |
| 458 return phase_2_auth_combobox_->model()->GetItemCount() > 1; | 457 return phase_2_auth_combobox_->model()->GetItemCount() > 1; |
| 459 return false; | 458 return false; |
| 460 } | 459 } |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1385 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, | 1384 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
| 1386 const NetworkState* network, | 1385 const NetworkState* network, |
| 1387 const std::string& key) { | 1386 const std::string& key) { |
| 1388 std::string onc_tag = network->type() == shill::kTypeEthernet | 1387 std::string onc_tag = network->type() == shill::kTypeEthernet |
| 1389 ? ::onc::ethernet::kEAP | 1388 ? ::onc::ethernet::kEAP |
| 1390 : ::onc::wifi::kEAP; | 1389 : ::onc::wifi::kEAP; |
| 1391 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); | 1390 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); |
| 1392 } | 1391 } |
| 1393 | 1392 |
| 1394 } // namespace chromeos | 1393 } // namespace chromeos |
| OLD | NEW |