| 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 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 shared ? 0 : WLAN_PROFILE_USER, | 1701 shared ? 0 : WLAN_PROFILE_USER, |
| 1702 profile_xml16.c_str(), | 1702 profile_xml16.c_str(), |
| 1703 NULL, | 1703 NULL, |
| 1704 overwrite, | 1704 overwrite, |
| 1705 NULL, | 1705 NULL, |
| 1706 &reason_code); | 1706 &reason_code); |
| 1707 return error_code; | 1707 return error_code; |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 bool WiFiServiceImpl::HaveProfile(const std::string& network_guid) { | 1710 bool WiFiServiceImpl::HaveProfile(const std::string& network_guid) { |
| 1711 DWORD error = ERROR_SUCCESS; | |
| 1712 std::string profile_xml; | 1711 std::string profile_xml; |
| 1713 return GetProfile(network_guid, false, &profile_xml) == ERROR_SUCCESS; | 1712 return GetProfile(network_guid, false, &profile_xml) == ERROR_SUCCESS; |
| 1714 } | 1713 } |
| 1715 | 1714 |
| 1716 | 1715 |
| 1717 DWORD WiFiServiceImpl::DeleteCreatedProfile(const std::string& network_guid) { | 1716 DWORD WiFiServiceImpl::DeleteCreatedProfile(const std::string& network_guid) { |
| 1718 base::DictionaryValue* created_profile = NULL; | 1717 base::DictionaryValue* created_profile = NULL; |
| 1719 DWORD error_code = ERROR_SUCCESS; | 1718 DWORD error_code = ERROR_SUCCESS; |
| 1720 // Check, whether this connection is using new created profile, and remove it. | 1719 // Check, whether this connection is using new created profile, and remove it. |
| 1721 if (created_profiles_.GetDictionaryWithoutPathExpansion( | 1720 if (created_profiles_.GetDictionaryWithoutPathExpansion( |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1841 NetworkGuidList changed_networks(1, network_guid); | 1840 NetworkGuidList changed_networks(1, network_guid); |
| 1842 message_loop_proxy_->PostTask( | 1841 message_loop_proxy_->PostTask( |
| 1843 FROM_HERE, | 1842 FROM_HERE, |
| 1844 base::Bind(networks_changed_observer_, changed_networks)); | 1843 base::Bind(networks_changed_observer_, changed_networks)); |
| 1845 } | 1844 } |
| 1846 } | 1845 } |
| 1847 | 1846 |
| 1848 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } | 1847 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } |
| 1849 | 1848 |
| 1850 } // namespace wifi | 1849 } // namespace wifi |
| OLD | NEW |