diff options
author | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 01:06:47 +0000 |
---|---|---|
committer | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 01:06:47 +0000 |
commit | a57ffbd55dd68110cecb02aff756a7e5c6d16d44 (patch) | |
tree | 193c9f7f45edcb76f7e2c00f7a6398cd07b02084 /components/wifi/wifi_service_win.cc | |
parent | 166a865e356b1841a1e3bf3b32bc5aaf13215f6e (diff) | |
download | chromium_src-a57ffbd55dd68110cecb02aff756a7e5c6d16d44.zip chromium_src-a57ffbd55dd68110cecb02aff756a7e5c6d16d44.tar.gz chromium_src-a57ffbd55dd68110cecb02aff756a7e5c6d16d44.tar.bz2 |
Move GetVisibleNetworks network type filtering to WiFiService interface.
Fix incorrect naming process_client => service_client, service_path => network_guid.
BUG=267667
Review URL: https://codereview.chromium.org/88653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/wifi/wifi_service_win.cc')
-rw-r--r-- | components/wifi/wifi_service_win.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/components/wifi/wifi_service_win.cc b/components/wifi/wifi_service_win.cc index 052062d..5f837fc 100644 --- a/components/wifi/wifi_service_win.cc +++ b/components/wifi/wifi_service_win.cc @@ -154,8 +154,10 @@ class WiFiServiceImpl : public WiFiService, base::NonThreadSafe { scoped_ptr<base::DictionaryValue> properties, std::string* error) OVERRIDE; - // Get list of visible networks. Populates |network_list| on success. - virtual void GetVisibleNetworks(ListValue* network_list) OVERRIDE; + // Get list of visible networks of |network_type| (one of onc::network_type). + // Populates |network_list| on success. + virtual void GetVisibleNetworks(const std::string& network_type, + ListValue* network_list) OVERRIDE; // Request network scan. Send |NetworkListChanged| event on completion. virtual void RequestNetworkScan() OVERRIDE; @@ -424,9 +426,15 @@ void WiFiServiceImpl::SetProperties( CheckError(ERROR_CALL_NOT_IMPLEMENTED, kWiFiServiceError, error); } -void WiFiServiceImpl::GetVisibleNetworks(ListValue* network_list) { - DWORD error = EnsureInitialized(); +void WiFiServiceImpl::GetVisibleNetworks(const std::string& network_type, + ListValue* network_list) { + if (!network_type.empty() && + network_type != onc::network_type::kAllTypes && + network_type != onc::network_type::kWiFi) { + return; + } + DWORD error = EnsureInitialized(); if (error == ERROR_SUCCESS) { NetworkList networks; error = GetVisibleNetworkList(&networks); |