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

Unified Diff: chrome/browser/resources/settings/internet_page/network_summary.js

Issue 2823563004: MD Settings: Network: Provide default WiFi network (Closed)
Patch Set: Rebase Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/internet_page/network_summary.js
diff --git a/chrome/browser/resources/settings/internet_page/network_summary.js b/chrome/browser/resources/settings/internet_page/network_summary.js
index 15e42bdc2482f2912170cd019a73be18f0696333..b2e88520435ed78991da7e633d6b48883a90c08c 100644
--- a/chrome/browser/resources/settings/internet_page/network_summary.js
+++ b/chrome/browser/resources/settings/internet_page/network_summary.js
@@ -55,25 +55,33 @@ Polymer({
networkingPrivate: Object,
/**
- * The device state for each network device type.
+ * The device state for each network device type. We initialize this to
+ * include a disabled WiFi type since WiFi is always present. This reduces
+ * the amount of visual change on first load.
* @private {DeviceStateObject}
*/
deviceStates: {
type: Object,
value: function() {
- return {};
+ return {
+ WiFi: {
+ Type: chrome.networkingPrivate.NetworkType.WI_FI,
+ State: chrome.networkingPrivate.DeviceStateType.DISABLED
+ },
+ };
},
notify: true,
},
/**
- * Array of active network states, one per device type.
+ * Array of active network states, one per device type. Initialized to
+ * include a default WiFi state (see deviceStates comment).
* @private {!Array<!CrOnc.NetworkStateProperties>}
*/
activeNetworkStates_: {
type: Array,
value: function() {
- return [];
+ return [{GUID: '', Type: chrome.networkingPrivate.NetworkType.WI_FI}];
},
},
@@ -84,7 +92,7 @@ Polymer({
networkStateLists_: {
type: Object,
value: function() {
- return {};
+ return {WiFi: []};
},
},
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698