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

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

Issue 1369403006: Add cr-policy-network-indicator and add to internet settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate policy indicator strings Created 5 years, 2 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 8fa56e8db11084af581a6315d0bf6e1e31f8931a..c9a63e1a4489c72316b4d46618e628a73afa5c5d 100644
--- a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
+++ b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
@@ -18,6 +18,8 @@
Polymer({
is: 'cr-settings-internet-detail-page',
+ behaviors: [CrPolicyNetworkBehavior],
+
properties: {
/**
* The network GUID to display details for.
@@ -244,8 +246,7 @@ Polymer({
* @private
*/
isConnectedState_: function(properties) {
- return !!properties && properties.ConnectionState ==
- CrOnc.ConnectionState.CONNECTED;
+ return properties.ConnectionState == CrOnc.ConnectionState.CONNECTED;
},
/**
@@ -254,7 +255,7 @@ Polymer({
* @private
*/
showConnect_: function(properties) {
- return !!properties && properties.Type != CrOnc.Type.ETHERNET &&
+ return properties.Type != CrOnc.Type.ETHERNET &&
properties.ConnectionState == CrOnc.ConnectionState.NOT_CONNECTED;
},
@@ -327,7 +328,7 @@ Polymer({
* @private
*/
showDisconnect_: function(properties) {
- return !!properties && properties.Type != CrOnc.Type.ETHERNET &&
+ return properties.Type != CrOnc.Type.ETHERNET &&
properties.ConnectionState != CrOnc.ConnectionState.NOT_CONNECTED;
},
@@ -487,8 +488,8 @@ Polymer({
* @private
*/
showShared_: function(properties) {
- return !!properties && (properties.Source == 'Device' ||
- properties.Source == 'DevicePolicy');
+ return (properties.Source == 'Device' ||
+ properties.Source == 'DevicePolicy');
},
/**
@@ -497,19 +498,28 @@ Polymer({
* @private
*/
showAutoConnect_: function(properties) {
- return !!properties && properties.Type != CrOnc.Type.ETHERNET &&
+ return properties.Type != CrOnc.Type.ETHERNET &&
properties.Source != CrOnc.Source.NONE;
},
/**
* @param {!CrOnc.NetworkProperties} properties
+ * @return {!CrOnc.ManagedProperty|undefined} Managed AutoConnect property.
+ * @private
+ */
+ getManagedAutoConnect_: function(properties) {
+ return CrOnc.getManagedAutoConnect(properties);
+ },
+
+ /**
+ * @param {!CrOnc.NetworkProperties} properties
* @return {boolean} True if the prefer network checkbox should be shown.
* @private
*/
showPreferNetwork_: function(properties) {
// TODO(stevenjb): Resolve whether or not we want to allow "preferred" for
// properties.Type == CrOnc.Type.ETHERNET.
- return !!properties && properties.Source != CrOnc.Source.NONE;
+ return properties.Source != CrOnc.Source.NONE;
},
/**
@@ -637,7 +647,7 @@ Polymer({
* @private
*/
hasNetworkSection_: function(properties) {
- return !!properties && properties.Type != CrOnc.Type.VPN;
+ return properties.Type != CrOnc.Type.VPN;
},
/**
@@ -647,7 +657,7 @@ Polymer({
* @private
*/
isType_: function(properties, type) {
- return !!properties && properties.Type == type;
+ return properties.Type == type;
},
/**

Powered by Google App Engine
This is Rietveld 408576698