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

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

Issue 2300783002: MD Settings: Internet: Cleanup JS (Closed)
Patch Set: Created 4 years, 4 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/browser/resources/settings/internet_page/internet_detail_page.js
diff --git a/chrome/browser/resources/settings/internet_page/internet_detail_page.js b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
index 0c6377bda636fcc04252fcf9b59c3c8afca9a82f..edac3d5c261f369a06d72f98a8de1bba9a3e1a01 100644
--- a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
+++ b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
@@ -32,47 +32,47 @@ Polymer({
},
/**
- * The network AutoConnect state.
+ * Highest priority connected network or null.
+ * @type {?CrOnc.NetworkStateProperties}
*/
- autoConnect: {
+ defaultNetwork: {
+ type: Object,
+ value: null,
+ },
+
+ /**
+ * Interface for networkingPrivate calls, passed from internet_page.
+ * @type {NetworkingPrivate}
+ */
+ networkingPrivate: Object,
+
+ /** The network AutoConnect state. */
dschuyler 2016/08/31 20:52:05 Should each of these be @private now that they hav
stevenjb 2016/08/31 21:33:44 Huh. I didn't think that was valid for properties,
+ autoConnect_: {
type: Boolean,
value: false,
observer: 'autoConnectChanged_',
},
- /**
- * The network preferred state.
- */
- preferNetwork: {
+ /** The network preferred state. */
+ preferNetwork_: {
type: Boolean,
value: false,
observer: 'preferNetworkChanged_',
},
- /**
- * The network IP Address.
- */
- IPAddress: {
+ /** The network IP Address. */
+ IPAddress_: {
type: String,
value: '',
},
- /**
- * Highest priority connected network or null.
- * @type {?CrOnc.NetworkStateProperties}
- */
- defaultNetwork: {
- type: Object,
- value: null,
- },
-
- advancedExpanded: {type: Boolean},
+ advancedExpanded_: {type: Boolean},
/**
* Object providing network type values for data binding.
* @const
*/
- NetworkType: {
+ NetworkType_: {
type: Object,
value: {
CELLULAR: CrOnc.Type.CELLULAR,
@@ -83,12 +83,6 @@ Polymer({
},
readOnly: true
},
-
- /**
- * Interface for networkingPrivate calls, passed from internet_page.
- * @type {NetworkingPrivate}
- */
- networkingPrivate: {type: Object},
},
/**
@@ -142,20 +136,20 @@ Polymer({
// Update autoConnect if it has changed. Default value is false.
var autoConnect = CrOnc.getAutoConnect(this.networkProperties);
- if (autoConnect != this.autoConnect)
- this.autoConnect = autoConnect;
+ if (autoConnect != this.autoConnect_)
+ this.autoConnect_ = autoConnect;
// Update preferNetwork if it has changed. Default value is false.
var priority = /** @type {number} */ (
CrOnc.getActiveValue(this.networkProperties.Priority) || 0);
var preferNetwork = priority > 0;
- if (preferNetwork != this.preferNetwork)
- this.preferNetwork = preferNetwork;
+ if (preferNetwork != this.preferNetwork_)
+ this.preferNetwork_ = preferNetwork;
// Set the IPAddress property to the IPV4 Address.
var ipv4 =
CrOnc.getIPConfigForType(this.networkProperties, CrOnc.IPType.IPV4);
- this.IPAddress = (ipv4 && ipv4.IPAddress) || '';
+ this.IPAddress_ = (ipv4 && ipv4.IPAddress) || '';
},
/** @private */
@@ -163,7 +157,7 @@ Polymer({
if (!this.networkProperties || !this.guid)
return;
var onc = this.getEmptyNetworkProperties_();
- CrOnc.setTypeProperty(onc, 'AutoConnect', this.autoConnect);
+ CrOnc.setTypeProperty(onc, 'AutoConnect', this.autoConnect_);
this.setNetworkProperties_(onc);
},
@@ -172,7 +166,7 @@ Polymer({
if (!this.networkProperties || !this.guid)
return;
var onc = this.getEmptyNetworkProperties_();
- onc.Priority = this.preferNetwork ? 1 : 0;
+ onc.Priority = this.preferNetwork_ ? 1 : 0;
this.setNetworkProperties_(onc);
},
@@ -429,7 +423,7 @@ Polymer({
toggleAdvancedExpanded_: function(event) {
if (event.target.id == 'expandButton')
return; // Already handled.
- this.advancedExpanded = !this.advancedExpanded;
+ this.advancedExpanded_ = !this.advancedExpanded_;
},
/**

Powered by Google App Engine
This is Rietveld 408576698