| 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/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" |
| 11 #include "chrome/browser/chromeos/enrollment_dialog_view.h" | 11 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
| 12 #include "chrome/browser/chromeos/options/network_connect.h" | 12 #include "chrome/browser/chromeos/net/onc_utils.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chromeos/login/login_state.h" | 14 #include "chromeos/login/login_state.h" |
| 15 #include "chromeos/network/network_configuration_handler.h" | 15 #include "chromeos/network/network_configuration_handler.h" |
| 16 #include "chromeos/network/network_event_log.h" | 16 #include "chromeos/network/network_event_log.h" |
| 17 #include "chromeos/network/network_handler.h" | 17 #include "chromeos/network/network_handler.h" |
| 18 #include "chromeos/network/network_state.h" | 18 #include "chromeos/network/network_state.h" |
| 19 #include "chromeos/network/network_state_handler.h" | 19 #include "chromeos/network/network_state_handler.h" |
| 20 #include "chromeos/network/network_ui_data.h" | 20 #include "chromeos/network/network_ui_data.h" |
| 21 #include "chromeos/network/onc/onc_constants.h" | 21 #include "chromeos/network/onc/onc_constants.h" |
| 22 #include "grit/chromium_strings.h" | 22 #include "grit/chromium_strings.h" |
| (...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 UpdateErrorLabel(); | 1294 UpdateErrorLabel(); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 // static | 1297 // static |
| 1298 void WifiConfigView::ParseWiFiUIProperty( | 1298 void WifiConfigView::ParseWiFiUIProperty( |
| 1299 NetworkPropertyUIData* property_ui_data, | 1299 NetworkPropertyUIData* property_ui_data, |
| 1300 const NetworkState* network, | 1300 const NetworkState* network, |
| 1301 const std::string& key) { | 1301 const std::string& key) { |
| 1302 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; | 1302 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; |
| 1303 const base::DictionaryValue* onc = | 1303 const base::DictionaryValue* onc = |
| 1304 network_connect::FindPolicyForActiveUser(network, &onc_source); | 1304 onc::FindPolicyForActiveUser(network->guid(), &onc_source); |
| 1305 | 1305 |
| 1306 property_ui_data->ParseOncProperty( | 1306 property_ui_data->ParseOncProperty( |
| 1307 onc_source, | 1307 onc_source, |
| 1308 onc, | 1308 onc, |
| 1309 base::StringPrintf("%s.%s", onc::network_config::kWiFi, key.c_str())); | 1309 base::StringPrintf("%s.%s", onc::network_config::kWiFi, key.c_str())); |
| 1310 } | 1310 } |
| 1311 | 1311 |
| 1312 // static | 1312 // static |
| 1313 void WifiConfigView::ParseWiFiEAPUIProperty( | 1313 void WifiConfigView::ParseWiFiEAPUIProperty( |
| 1314 NetworkPropertyUIData* property_ui_data, | 1314 NetworkPropertyUIData* property_ui_data, |
| 1315 const NetworkState* network, | 1315 const NetworkState* network, |
| 1316 const std::string& key) { | 1316 const std::string& key) { |
| 1317 ParseWiFiUIProperty( | 1317 ParseWiFiUIProperty( |
| 1318 property_ui_data, network, | 1318 property_ui_data, network, |
| 1319 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); | 1319 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); |
| 1320 } | 1320 } |
| 1321 | 1321 |
| 1322 } // namespace chromeos | 1322 } // namespace chromeos |
| OLD | NEW |