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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 shill::kEapSubjectMatchProperty, GetEapSubjectMatch()); | 876 shill::kEapSubjectMatchProperty, GetEapSubjectMatch()); |
877 | 877 |
878 SetEapClientCertProperties(properties); | 878 SetEapClientCertProperties(properties); |
879 | 879 |
880 properties->SetBooleanWithoutPathExpansion( | 880 properties->SetBooleanWithoutPathExpansion( |
881 shill::kEapUseSystemCasProperty, GetEapUseSystemCas()); | 881 shill::kEapUseSystemCasProperty, GetEapUseSystemCas()); |
882 properties->SetStringWithoutPathExpansion( | 882 properties->SetStringWithoutPathExpansion( |
883 shill::kEapPasswordProperty, GetPassphrase()); | 883 shill::kEapPasswordProperty, GetPassphrase()); |
884 | 884 |
885 base::ListValue* pem_list = new base::ListValue; | 885 base::ListValue* pem_list = new base::ListValue; |
886 pem_list->AppendString(GetEapServerCaCertPEM()); | 886 std::string ca_cert_pem = GetEapServerCaCertPEM(); |
| 887 if (!ca_cert_pem.empty()) |
| 888 pem_list->AppendString(ca_cert_pem); |
887 properties->SetWithoutPathExpansion( | 889 properties->SetWithoutPathExpansion( |
888 shill::kEapCaCertPemProperty, pem_list); | 890 shill::kEapCaCertPemProperty, pem_list); |
889 } | 891 } |
890 | 892 |
891 void WifiConfigView::Cancel() { | 893 void WifiConfigView::Cancel() { |
892 } | 894 } |
893 | 895 |
894 void WifiConfigView::Init(bool show_8021x) { | 896 void WifiConfigView::Init(bool show_8021x) { |
895 const NetworkState* network = GetNetworkState(); | 897 const NetworkState* network = GetNetworkState(); |
896 if (network) { | 898 if (network) { |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, | 1377 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
1376 const NetworkState* network, | 1378 const NetworkState* network, |
1377 const std::string& key) { | 1379 const std::string& key) { |
1378 std::string onc_tag = network->type() == shill::kTypeEthernet | 1380 std::string onc_tag = network->type() == shill::kTypeEthernet |
1379 ? ::onc::ethernet::kEAP | 1381 ? ::onc::ethernet::kEAP |
1380 : ::onc::wifi::kEAP; | 1382 : ::onc::wifi::kEAP; |
1381 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); | 1383 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); |
1382 } | 1384 } |
1383 | 1385 |
1384 } // namespace chromeos | 1386 } // namespace chromeos |
OLD | NEW |