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/fake_wifi_service.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/fake_wifi_service.cc')
-rw-r--r-- | components/wifi/fake_wifi_service.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/components/wifi/fake_wifi_service.cc b/components/wifi/fake_wifi_service.cc index e8c2372..a1eac21 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 || + it->type == network_type) { + scoped_ptr<DictionaryValue> network(it->ToValue(true)); + network_list->Append(network.release()); + } } } |