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/ui/webui/options/chromeos/internet_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; | 1517 ::onc::ONCSource onc_source = ::onc::ONC_SOURCE_NONE; |
1518 const base::DictionaryValue* onc = | 1518 const base::DictionaryValue* onc = |
1519 onc::FindPolicyForActiveUser(network->guid(), &onc_source); | 1519 onc::FindPolicyForActiveUser(network->guid(), &onc_source); |
1520 const NetworkPropertyUIData property_ui_data(onc_source); | 1520 const NetworkPropertyUIData property_ui_data(onc_source); |
1521 | 1521 |
1522 base::DictionaryValue dictionary; | 1522 base::DictionaryValue dictionary; |
1523 | 1523 |
1524 // Device hardware address | 1524 // Device hardware address |
1525 const DeviceState* device = NetworkHandler::Get()->network_state_handler()-> | 1525 const DeviceState* device = NetworkHandler::Get()->network_state_handler()-> |
1526 GetDeviceState(network->device_path()); | 1526 GetDeviceState(network->device_path()); |
1527 if (device) | 1527 if (device) { |
1528 dictionary.SetString(kTagHardwareAddress, device->GetFormattedMacAddress()); | 1528 dictionary.SetString( |
| 1529 kTagHardwareAddress, |
| 1530 network_util::FormattedMacAddress(device->mac_address())); |
| 1531 } |
1529 | 1532 |
1530 // IP config | 1533 // IP config |
1531 scoped_ptr<base::DictionaryValue> ipconfig_dhcp(new base::DictionaryValue); | 1534 scoped_ptr<base::DictionaryValue> ipconfig_dhcp(new base::DictionaryValue); |
1532 ipconfig_dhcp->SetString(kIpConfigAddress, network->ip_address()); | 1535 ipconfig_dhcp->SetString(kIpConfigAddress, network->ip_address()); |
1533 ipconfig_dhcp->SetString(kIpConfigNetmask, network->GetNetmask()); | 1536 ipconfig_dhcp->SetString(kIpConfigNetmask, network->GetNetmask()); |
1534 ipconfig_dhcp->SetString(kIpConfigGateway, network->gateway()); | 1537 ipconfig_dhcp->SetString(kIpConfigGateway, network->gateway()); |
1535 std::string ipconfig_name_servers = network->GetDnsServersAsString(); | 1538 std::string ipconfig_name_servers = network->GetDnsServersAsString(); |
1536 ipconfig_dhcp->SetString(kIpConfigNameServers, ipconfig_name_servers); | 1539 ipconfig_dhcp->SetString(kIpConfigNameServers, ipconfig_name_servers); |
1537 ipconfig_dhcp->SetString(kIpConfigWebProxyAutoDiscoveryUrl, | 1540 ipconfig_dhcp->SetString(kIpConfigWebProxyAutoDiscoveryUrl, |
1538 network->web_proxy_auto_discovery_url().spec()); | 1541 network->web_proxy_auto_discovery_url().spec()); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 dictionary->SetBoolean( | 1824 dictionary->SetBoolean( |
1822 kTagWimaxAvailable, | 1825 kTagWimaxAvailable, |
1823 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); | 1826 handler->IsTechnologyAvailable(NetworkTypePattern::Wimax())); |
1824 dictionary->SetBoolean( | 1827 dictionary->SetBoolean( |
1825 kTagWimaxEnabled, | 1828 kTagWimaxEnabled, |
1826 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); | 1829 handler->IsTechnologyEnabled(NetworkTypePattern::Wimax())); |
1827 } | 1830 } |
1828 | 1831 |
1829 } // namespace options | 1832 } // namespace options |
1830 } // namespace chromeos | 1833 } // namespace chromeos |
OLD | NEW |