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

Unified Diff: chrome/test/data/webui/settings/fake_networking_private.js

Issue 2720503006: MD Settings: Internet: Move network lists to a subpage (Closed)
Patch Set: Rebase Created 3 years, 10 months 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: chrome/test/data/webui/settings/fake_networking_private.js
diff --git a/chrome/test/data/webui/settings/fake_networking_private.js b/chrome/test/data/webui/settings/fake_networking_private.js
index 730962efe046043a3b69ea134dd9fa09596d49a8..cb94e8fde9b503b2f27cf86340f0dde9b6574b1f 100644
--- a/chrome/test/data/webui/settings/fake_networking_private.js
+++ b/chrome/test/data/webui/settings/fake_networking_private.js
@@ -72,7 +72,16 @@ cr.define('settings', function() {
/** @override */
getNetworks: function(filter, callback) {
- callback(this.networkStates_);
+ var states = [];
michaelpg 2017/03/01 23:27:59 opt nit: It's just a style thing, but this.network
stevenjb 2017/03/02 00:25:17 One of these days I'll learn these crazy Javascrip
+ var type = filter.networkType;
+ for (var i = 0; i < this.networkStates_.length; ++i) {
+ var state = this.networkStates_[i];
+ if (type == chrome.networkingPrivate.NetworkType.ALL ||
+ type == state.Type) {
+ states.push(state);
+ }
+ }
+ callback(states);
},
/** @override */

Powered by Google App Engine
This is Rietveld 408576698