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

Side by Side Diff: chrome/browser/resources/settings/internet_page/network_proxy.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 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 Polymer element for displaying and editing network proxy 6 * @fileoverview Polymer element for displaying and editing network proxy
7 * values. 7 * values.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'network-proxy', 10 is: 'network-proxy',
11 11
12 behaviors: [CrPolicyNetworkBehavior],
13
12 properties: { 14 properties: {
13 /** 15 /**
14 * The network properties dictionary containing the proxy properties to 16 * The network properties dictionary containing the proxy properties to
15 * display and modify. 17 * display and modify.
16 * @type {!CrOnc.NetworkProperties|undefined} 18 * @type {!CrOnc.NetworkProperties|undefined}
17 */ 19 */
18 networkProperties: { 20 networkProperties: {
19 type: Object, 21 type: Object,
20 observer: 'networkPropertiesChanged_' 22 observer: 'networkPropertiesChanged_'
21 }, 23 },
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (proxyType == CrOnc.ProxySettingsType.MANUAL) 251 if (proxyType == CrOnc.ProxySettingsType.MANUAL)
250 return 'Manual proxy configuration'; 252 return 'Manual proxy configuration';
251 if (proxyType == CrOnc.ProxySettingsType.PAC) 253 if (proxyType == CrOnc.ProxySettingsType.PAC)
252 return 'Automatic proxy configuration'; 254 return 'Automatic proxy configuration';
253 if (proxyType == CrOnc.ProxySettingsType.WPAD) 255 if (proxyType == CrOnc.ProxySettingsType.WPAD)
254 return 'Web proxy autodiscovery'; 256 return 'Web proxy autodiscovery';
255 return 'Direct Internet connection'; 257 return 'Direct Internet connection';
256 }, 258 },
257 259
258 /** 260 /**
261 * @param {boolean} editable
262 * @param {!CrOnc.NetworkProperties} networkProperties
263 * @param {string} key
264 * @return {boolean} Whether the property is editable.
265 * @private
266 */
267 isPropertyEditable_: function(editable, networkProperties, key) {
268 if (!editable)
269 return false;
270 var property = /** @type {!CrOnc.NetworkProperty|undefined} */(
271 this.get(key, networkProperties));
272 return !this.isNetworkPolicyEnforced(property);
273 },
274
275 /**
259 * @param {string} property The property to test 276 * @param {string} property The property to test
260 * @param {string} value The value to test against 277 * @param {string} value The value to test against
261 * @return {boolean} True if property == value 278 * @return {boolean} True if property == value
262 * @private 279 * @private
263 */ 280 */
264 matches_: function(property, value) { 281 matches_: function(property, value) {
265 return property == value; 282 return property == value;
266 } 283 }
267 }); 284 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698