Chromium Code Reviews| Index: components/wifi/fake_wifi_service.cc |
| diff --git a/components/wifi/fake_wifi_service.cc b/components/wifi/fake_wifi_service.cc |
| index e8c2372dee09c2a44c11554058b38c3b54135856..3add5ec56027dd80145ae15f470640564dbfa513 100644 |
| --- a/components/wifi/fake_wifi_service.cc |
| +++ b/components/wifi/fake_wifi_service.cc |
| @@ -107,12 +107,17 @@ class FakeWiFiService : public WiFiService { |
| } |
| } |
| - virtual void GetVisibleNetworks(ListValue* network_list) OVERRIDE { |
| + virtual void GetVisibleNetworks(const std::string& network_type, |
| + ListValue* network_list) OVERRIDE { |
| for (WiFiService::NetworkList::const_iterator it = networks_.begin(); |
| it != networks_.end(); |
| ++it) { |
| - scoped_ptr<DictionaryValue> network(it->ToValue(true)); |
| - network_list->Append(network.release()); |
| + if (network_type.empty() || |
| + network_type == onc::network_type::kAllTypes || |
| + network_type == it->type) { |
|
tbarzic
2013/11/26 18:39:36
nit: I find it more natural to have the value that
mef
2013/11/26 18:59:15
Done.
|
| + scoped_ptr<DictionaryValue> network(it->ToValue(true)); |
| + network_list->Append(network.release()); |
| + } |
| } |
| } |