| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/wifi/wifi_service.h" | 5 #include "components/wifi/wifi_service.h" |
| 6 | 6 |
| 7 #include <iphlpapi.h> | 7 #include <iphlpapi.h> |
| 8 #include <objbase.h> | 8 #include <objbase.h> |
| 9 #include <wlanapi.h> | 9 #include <wlanapi.h> |
| 10 | 10 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 return; | 523 return; |
| 524 } | 524 } |
| 525 | 525 |
| 526 network_properties.guid = network_properties.ssid; | 526 network_properties.guid = network_properties.ssid; |
| 527 std::string profile_xml; | 527 std::string profile_xml; |
| 528 if (!CreateProfile(network_properties, &profile_xml)) { | 528 if (!CreateProfile(network_properties, &profile_xml)) { |
| 529 CheckError(ERROR_INVALID_DATA, kWiFiServiceError, error); | 529 CheckError(ERROR_INVALID_DATA, kWiFiServiceError, error); |
| 530 return; | 530 return; |
| 531 } | 531 } |
| 532 | 532 |
| 533 base::string16 profile_xml16(UTF8ToUTF16(profile_xml)); | 533 base::string16 profile_xml16(base::UTF8ToUTF16(profile_xml)); |
| 534 DWORD reason_code = 0u; | 534 DWORD reason_code = 0u; |
| 535 | 535 |
| 536 error_code = WlanSetProfile_function_(client_, | 536 error_code = WlanSetProfile_function_(client_, |
| 537 &interface_guid_, | 537 &interface_guid_, |
| 538 shared ? 0 : WLAN_PROFILE_USER, | 538 shared ? 0 : WLAN_PROFILE_USER, |
| 539 profile_xml16.c_str(), | 539 profile_xml16.c_str(), |
| 540 NULL, | 540 NULL, |
| 541 FALSE, | 541 FALSE, |
| 542 NULL, | 542 NULL, |
| 543 &reason_code); | 543 &reason_code); |
| (...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 NetworkGuidList changed_networks(1, network_guid); | 1581 NetworkGuidList changed_networks(1, network_guid); |
| 1582 message_loop_proxy_->PostTask( | 1582 message_loop_proxy_->PostTask( |
| 1583 FROM_HERE, | 1583 FROM_HERE, |
| 1584 base::Bind(networks_changed_observer_, changed_networks)); | 1584 base::Bind(networks_changed_observer_, changed_networks)); |
| 1585 } | 1585 } |
| 1586 } | 1586 } |
| 1587 | 1587 |
| 1588 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } | 1588 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } |
| 1589 | 1589 |
| 1590 } // namespace wifi | 1590 } // namespace wifi |
| OLD | NEW |