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/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 RefreshShareCheckbox(); | 1230 RefreshShareCheckbox(); |
1231 UpdateErrorLabel(); | 1231 UpdateErrorLabel(); |
1232 } | 1232 } |
1233 | 1233 |
1234 void WifiConfigView::InitFocus() { | 1234 void WifiConfigView::InitFocus() { |
1235 views::View* view_to_focus = GetInitiallyFocusedView(); | 1235 views::View* view_to_focus = GetInitiallyFocusedView(); |
1236 if (view_to_focus) | 1236 if (view_to_focus) |
1237 view_to_focus->RequestFocus(); | 1237 view_to_focus->RequestFocus(); |
1238 } | 1238 } |
1239 | 1239 |
| 1240 // static |
1240 void WifiConfigView::ParseWiFiUIProperty( | 1241 void WifiConfigView::ParseWiFiUIProperty( |
1241 NetworkPropertyUIData* property_ui_data, | 1242 NetworkPropertyUIData* property_ui_data, |
1242 Network* network, | 1243 Network* network, |
1243 const std::string& key) { | 1244 const std::string& key) { |
1244 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); | 1245 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); |
1245 property_ui_data->ParseOncProperty( | 1246 property_ui_data->ParseOncProperty( |
1246 network->ui_data(), | 1247 network->ui_data(), |
1247 network_library->FindOncForNetwork(network->unique_id()), | 1248 network_library->FindOncForNetwork(network->unique_id()), |
1248 base::StringPrintf("%s.%s", onc::kWiFi, key.c_str())); | 1249 base::StringPrintf("%s.%s", onc::kWiFi, key.c_str())); |
1249 } | 1250 } |
1250 | 1251 |
| 1252 // static |
1251 void WifiConfigView::ParseWiFiEAPUIProperty( | 1253 void WifiConfigView::ParseWiFiEAPUIProperty( |
1252 NetworkPropertyUIData* property_ui_data, | 1254 NetworkPropertyUIData* property_ui_data, |
1253 Network* network, | 1255 Network* network, |
1254 const std::string& key) { | 1256 const std::string& key) { |
1255 ParseWiFiUIProperty( | 1257 ParseWiFiUIProperty( |
1256 property_ui_data, network, | 1258 property_ui_data, network, |
1257 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); | 1259 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); |
1258 } | 1260 } |
1259 | 1261 |
1260 } // namespace chromeos | 1262 } // namespace chromeos |
OLD | NEW |