| OLD | NEW |
| 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 * 'cr-settings-internet-detail' is the settings subpage containing details | 7 * 'cr-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 cr-settings-internet-detail | 11 * @element cr-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: 'cr-settings-internet-detail-page', | 19 is: 'cr-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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 * @return {boolean} True if the AutoConnect checkbox should be shown. | 497 * @return {boolean} True if the AutoConnect checkbox should be shown. |
| 496 * @private | 498 * @private |
| 497 */ | 499 */ |
| 498 showAutoConnect_: function(properties) { | 500 showAutoConnect_: function(properties) { |
| 499 return properties.Type != CrOnc.Type.ETHERNET && | 501 return properties.Type != CrOnc.Type.ETHERNET && |
| 500 properties.Source != CrOnc.Source.NONE; | 502 properties.Source != CrOnc.Source.NONE; |
| 501 }, | 503 }, |
| 502 | 504 |
| 503 /** | 505 /** |
| 504 * @param {!CrOnc.NetworkProperties} properties | 506 * @param {!CrOnc.NetworkProperties} properties |
| 507 * @return {!CrOnc.ManagedProperty|undefined} Managed AutoConnect property. |
| 508 * @private |
| 509 */ |
| 510 getManagedAutoConnect_: function(properties) { |
| 511 return CrOnc.getManagedAutoConnect(properties); |
| 512 }, |
| 513 |
| 514 /** |
| 515 * @param {!CrOnc.NetworkProperties} properties |
| 505 * @return {boolean} True if the prefer network checkbox should be shown. | 516 * @return {boolean} True if the prefer network checkbox should be shown. |
| 506 * @private | 517 * @private |
| 507 */ | 518 */ |
| 508 showPreferNetwork_: function(properties) { | 519 showPreferNetwork_: function(properties) { |
| 509 // TODO(stevenjb): Resolve whether or not we want to allow "preferred" for | 520 // TODO(stevenjb): Resolve whether or not we want to allow "preferred" for |
| 510 // properties.Type == CrOnc.Type.ETHERNET. | 521 // properties.Type == CrOnc.Type.ETHERNET. |
| 511 return properties.Source != CrOnc.Source.NONE; | 522 return properties.Source != CrOnc.Source.NONE; |
| 512 }, | 523 }, |
| 513 | 524 |
| 514 /** | 525 /** |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 */ | 682 */ |
| 672 allPropertiesMatch_: function(curValue, newValue) { | 683 allPropertiesMatch_: function(curValue, newValue) { |
| 673 for (let key in newValue) { | 684 for (let key in newValue) { |
| 674 if (newValue[key] != curValue[key]) | 685 if (newValue[key] != curValue[key]) |
| 675 return false; | 686 return false; |
| 676 } | 687 } |
| 677 return true; | 688 return true; |
| 678 } | 689 } |
| 679 }); | 690 }); |
| 680 })(); | 691 })(); |
| OLD | NEW |