Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 1426393003: NOT FOR REVIEW Base URL: https://chromium.googlesource.com/chromium/src.git@submit-4.5-split-wcss
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/mobile/mobile_activator.cc ('k') | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698