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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 UpdateErrorLabel(); | 648 UpdateErrorLabel(); |
649 } | 649 } |
650 | 650 |
651 void WifiConfigView::OnCertificatesLoaded(bool initial_load) { | 651 void WifiConfigView::OnCertificatesLoaded(bool initial_load) { |
652 RefreshEapFields(); | 652 RefreshEapFields(); |
653 UpdateDialogButtons(); | 653 UpdateDialogButtons(); |
654 UpdateErrorLabel(); | 654 UpdateErrorLabel(); |
655 } | 655 } |
656 | 656 |
657 bool WifiConfigView::Login() { | 657 bool WifiConfigView::Login() { |
| 658 LOG(ERROR) << "*** QUICHE: " << __func__; |
658 const NetworkState* network = GetNetworkState(); | 659 const NetworkState* network = GetNetworkState(); |
659 | 660 |
660 // Set configuration properties. | 661 // Set configuration properties. |
661 base::DictionaryValue properties; | 662 base::DictionaryValue properties; |
662 | 663 |
663 // Default shared state for non-private networks is true. | 664 // Default shared state for non-private networks is true. |
664 const bool share_default = !network || !network->IsPrivate(); | 665 const bool share_default = !network || !network->IsPrivate(); |
665 bool share_network = GetShareNetwork(share_default); | 666 bool share_network = GetShareNetwork(share_default); |
666 bool only_policy_autoconnect = | 667 bool only_policy_autoconnect = |
667 onc::PolicyAllowsOnlyPolicyNetworksToAutoconnect(!share_network); | 668 onc::PolicyAllowsOnlyPolicyNetworksToAutoconnect(!share_network); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 if (network->type() == shill::kTypeEthernet) { | 730 if (network->type() == shill::kTypeEthernet) { |
730 // When configuring an ethernet service, we actually configure the | 731 // When configuring an ethernet service, we actually configure the |
731 // EthernetEap service, which exists in the Profile only. | 732 // EthernetEap service, which exists in the Profile only. |
732 // See crbug.com/126870 for more info. | 733 // See crbug.com/126870 for more info. |
733 properties.SetStringWithoutPathExpansion(shill::kTypeProperty, | 734 properties.SetStringWithoutPathExpansion(shill::kTypeProperty, |
734 shill::kTypeEthernetEap); | 735 shill::kTypeEthernetEap); |
735 share_network = false; | 736 share_network = false; |
736 ui::NetworkConnect::Get()->CreateConfiguration(&properties, | 737 ui::NetworkConnect::Get()->CreateConfiguration(&properties, |
737 share_network); | 738 share_network); |
738 } else { | 739 } else { |
| 740 LOG(ERROR) << "*** QUICHE: " << __func__; |
739 ui::NetworkConnect::Get()->ConfigureNetworkAndConnect( | 741 ui::NetworkConnect::Get()->ConfigureNetworkAndConnect( |
740 service_path_, properties, share_network); | 742 service_path_, properties, share_network); |
741 } | 743 } |
742 } | 744 } |
743 return true; // dialog will be closed | 745 return true; // dialog will be closed |
744 } | 746 } |
745 | 747 |
746 std::string WifiConfigView::GetSsid() const { | 748 std::string WifiConfigView::GetSsid() const { |
747 std::string result; | 749 std::string result; |
748 if (ssid_textfield_ != NULL) { | 750 if (ssid_textfield_ != NULL) { |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, | 1380 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
1379 const NetworkState* network, | 1381 const NetworkState* network, |
1380 const std::string& key) { | 1382 const std::string& key) { |
1381 std::string onc_tag = network->type() == shill::kTypeEthernet | 1383 std::string onc_tag = network->type() == shill::kTypeEthernet |
1382 ? ::onc::ethernet::kEAP | 1384 ? ::onc::ethernet::kEAP |
1383 : ::onc::wifi::kEAP; | 1385 : ::onc::wifi::kEAP; |
1384 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); | 1386 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); |
1385 } | 1387 } |
1386 | 1388 |
1387 } // namespace chromeos | 1389 } // namespace chromeos |
OLD | NEW |