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

Side by Side Diff: chrome/browser/resources/settings/internet_page/internet_detail_page.js

Issue 1390073006: Add cr-policy-network-indicator to internet pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_521791_network_indicators_c3
Patch Set: Formatting fixes Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-internet-detail' is the settings subpage containing details 7 * 'settings-internet-detail' is the settings subpage containing details
8 * for a network. 8 * for a network.
9 * 9 *
10 * @group Chrome Settings Elements 10 * @group Chrome Settings Elements
11 * @element settings-internet-detail 11 * @element settings-internet-detail
12 */ 12 */
13 (function() { 13 (function() {
14 'use strict'; 14 'use strict';
15 15
16 /** @const */ var CARRIER_VERIZON = 'Verizon Wireless'; 16 /** @const */ var CARRIER_VERIZON = 'Verizon Wireless';
17 17
18 Polymer({ 18 Polymer({
19 is: 'settings-internet-detail-page', 19 is: 'settings-internet-detail-page',
20 20
21 behaviors: [CrPolicyNetworkBehavior],
22
21 properties: { 23 properties: {
22 /** 24 /**
23 * The network GUID to display details for. 25 * The network GUID to display details for.
24 */ 26 */
25 guid: { 27 guid: {
26 type: String, 28 type: String,
27 value: '', 29 value: '',
28 observer: 'guidChanged_', 30 observer: 'guidChanged_',
29 }, 31 },
30 32
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 * @return {boolean} True if the AutoConnect checkbox should be shown. 496 * @return {boolean} True if the AutoConnect checkbox should be shown.
495 * @private 497 * @private
496 */ 498 */
497 showAutoConnect_: function(properties) { 499 showAutoConnect_: function(properties) {
498 return properties.Type != CrOnc.Type.ETHERNET && 500 return properties.Type != CrOnc.Type.ETHERNET &&
499 properties.Source != CrOnc.Source.NONE; 501 properties.Source != CrOnc.Source.NONE;
500 }, 502 },
501 503
502 /** 504 /**
503 * @param {!CrOnc.NetworkProperties} properties 505 * @param {!CrOnc.NetworkProperties} properties
506 * @return {!CrOnc.ManagedProperty|undefined} Managed AutoConnect property.
507 * @private
508 */
509 getManagedAutoConnect_: function(properties) {
510 return CrOnc.getManagedAutoConnect(properties);
511 },
512
513 /**
514 * @param {!CrOnc.NetworkProperties} properties
504 * @return {boolean} True if the prefer network checkbox should be shown. 515 * @return {boolean} True if the prefer network checkbox should be shown.
505 * @private 516 * @private
506 */ 517 */
507 showPreferNetwork_: function(properties) { 518 showPreferNetwork_: function(properties) {
508 // TODO(stevenjb): Resolve whether or not we want to allow "preferred" for 519 // TODO(stevenjb): Resolve whether or not we want to allow "preferred" for
509 // properties.Type == CrOnc.Type.ETHERNET. 520 // properties.Type == CrOnc.Type.ETHERNET.
510 return properties.Source != CrOnc.Source.NONE; 521 return properties.Source != CrOnc.Source.NONE;
511 }, 522 },
512 523
513 /** 524 /**
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 */ 681 */
671 allPropertiesMatch_: function(curValue, newValue) { 682 allPropertiesMatch_: function(curValue, newValue) {
672 for (let key in newValue) { 683 for (let key in newValue) {
673 if (newValue[key] != curValue[key]) 684 if (newValue[key] != curValue[key])
674 return false; 685 return false;
675 } 686 }
676 return true; 687 return true;
677 } 688 }
678 }); 689 });
679 })(); 690 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698