Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(840)

Unified Diff: components/wifi/fake_wifi_service.cc

Issue 88653002: Move GetVisibleNetworks network type filtering to WiFiService interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Toni's comments. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a1eac21d5887a6c97d4ca4204fbea02d78114a93 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());
+ }
}
}
« no previous file with comments | « chrome/browser/extensions/api/networking_private/networking_private_service_client.cc ('k') | components/wifi/wifi_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698