| 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 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 UpdateErrorLabel(); | 1258 UpdateErrorLabel(); |
| 1259 } | 1259 } |
| 1260 | 1260 |
| 1261 // static | 1261 // static |
| 1262 void WifiConfigView::ParseWiFiUIProperty( | 1262 void WifiConfigView::ParseWiFiUIProperty( |
| 1263 NetworkPropertyUIData* property_ui_data, | 1263 NetworkPropertyUIData* property_ui_data, |
| 1264 const NetworkState* network, | 1264 const NetworkState* network, |
| 1265 const std::string& key) { | 1265 const std::string& key) { |
| 1266 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; | 1266 onc::ONCSource onc_source = onc::ONC_SOURCE_NONE; |
| 1267 const base::DictionaryValue* onc = | 1267 const base::DictionaryValue* onc = |
| 1268 network_connect::FindPolicyForActiveUser(network, &onc_source); | 1268 onc::FindPolicyForActiveUser(network->guid(), &onc_source); |
| 1269 | 1269 |
| 1270 property_ui_data->ParseOncProperty( | 1270 property_ui_data->ParseOncProperty( |
| 1271 onc_source, | 1271 onc_source, |
| 1272 onc, | 1272 onc, |
| 1273 base::StringPrintf("%s.%s", onc::network_config::kWiFi, key.c_str())); | 1273 base::StringPrintf("%s.%s", onc::network_config::kWiFi, key.c_str())); |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 // static | 1276 // static |
| 1277 void WifiConfigView::ParseWiFiEAPUIProperty( | 1277 void WifiConfigView::ParseWiFiEAPUIProperty( |
| 1278 NetworkPropertyUIData* property_ui_data, | 1278 NetworkPropertyUIData* property_ui_data, |
| 1279 const NetworkState* network, | 1279 const NetworkState* network, |
| 1280 const std::string& key) { | 1280 const std::string& key) { |
| 1281 ParseWiFiUIProperty( | 1281 ParseWiFiUIProperty( |
| 1282 property_ui_data, network, | 1282 property_ui_data, network, |
| 1283 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); | 1283 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); |
| 1284 } | 1284 } |
| 1285 | 1285 |
| 1286 } // namespace chromeos | 1286 } // namespace chromeos |
| OLD | NEW |