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

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

Issue 2300783002: MD Settings: Internet: Cleanup JS (Closed)
Patch Set: Feedback 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..69c37b6031b9cfd3599fe911d6095997a0d561e7 100644
--- a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
+++ b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
@@ -32,9 +32,25 @@ Polymer({
},
/**
+ * Highest priority connected network or null.
+ * @type {?CrOnc.NetworkStateProperties}
+ */
+ defaultNetwork: {
+ type: Object,
+ value: null,
+ },
+
+ /**
+ * Interface for networkingPrivate calls, passed from internet_page.
+ * @type {NetworkingPrivate}
+ */
+ networkingPrivate: Object,
+
+ /**
* The network AutoConnect state.
+ * @private
*/
- autoConnect: {
+ autoConnect_: {
type: Boolean,
value: false,
observer: 'autoConnectChanged_',
@@ -42,8 +58,9 @@ Polymer({
/**
* The network preferred state.
+ * @private
*/
- preferNetwork: {
+ preferNetwork_: {
type: Boolean,
value: false,
observer: 'preferNetworkChanged_',
@@ -51,28 +68,22 @@ Polymer({
/**
* The network IP Address.
+ * @private
*/
- IPAddress: {
+ IPAddress_: {
type: String,
value: '',
},
- /**
- * Highest priority connected network or null.
- * @type {?CrOnc.NetworkStateProperties}
- */
- defaultNetwork: {
- type: Object,
- value: null,
- },
-
- advancedExpanded: {type: Boolean},
+ /** @private */
+ advancedExpanded_: Boolean,
/**
* Object providing network type values for data binding.
* @const
+ * @private
*/
- NetworkType: {
+ NetworkType_: {
type: Object,
value: {
CELLULAR: CrOnc.Type.CELLULAR,
@@ -83,12 +94,6 @@ Polymer({
},
readOnly: true
},
-
- /**
- * Interface for networkingPrivate calls, passed from internet_page.
- * @type {NetworkingPrivate}
- */
- networkingPrivate: {type: Object},
},
/**
@@ -142,20 +147,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 +168,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 +177,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 +434,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