Chromium Code Reviews| Index: components/wifi/wifi_service_win.cc |
| diff --git a/components/wifi/wifi_service_win.cc b/components/wifi/wifi_service_win.cc |
| index 052062db1a757f5f4bfa617b74cf9e96bc186876..df73d44632c2845a55f917337e50606f58cc1b28 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 || |
|
tbarzic
2013/11/26 18:39:36
nit: I think that if (!a && !b && !c) looks nicer
mef
2013/11/26 18:59:15
Done.
|
| + network_type == onc::network_type::kWiFi)) { |
| + return; |
| + } |
| + DWORD error = EnsureInitialized(); |
| if (error == ERROR_SUCCESS) { |
| NetworkList networks; |
| error = GetVisibleNetworkList(&networks); |