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 * 'settings-internet-page' is the settings page containing internet | 7 * 'settings-internet-page' is the settings page containing internet |
8 * settings. | 8 * settings. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 onExtensionDisabled_: function(extension) { | 322 onExtensionDisabled_: function(extension) { |
323 this.onExtensionRemoved_(extension.id); | 323 this.onExtensionRemoved_(extension.id); |
324 }, | 324 }, |
325 | 325 |
326 /** | 326 /** |
327 * @param {!chrome.networkingPrivate.DeviceStateProperties} deviceState | 327 * @param {!chrome.networkingPrivate.DeviceStateProperties} deviceState |
328 * @return {boolean} | 328 * @return {boolean} |
329 * @private | 329 * @private |
330 */ | 330 */ |
331 deviceIsEnabled_: function(deviceState) { | 331 deviceIsEnabled_: function(deviceState) { |
332 return deviceState.State == | 332 return !!deviceState && deviceState.State == |
333 chrome.networkingPrivate.DeviceStateType.ENABLED; | 333 chrome.networkingPrivate.DeviceStateType.ENABLED; |
334 }, | 334 }, |
335 | 335 |
336 /** | 336 /** |
337 * @param {!chrome.networkingPrivate.GlobalPolicy} globalPolicy | 337 * @param {!chrome.networkingPrivate.GlobalPolicy} globalPolicy |
338 * @return {boolean} | 338 * @return {boolean} |
339 */ | 339 */ |
340 allowAddConnection_: function(globalPolicy) { | 340 allowAddConnection_: function(globalPolicy) { |
341 return !globalPolicy.AllowOnlyPolicyNetworksToConnect; | 341 return !globalPolicy.AllowOnlyPolicyNetworksToConnect; |
342 }, | 342 }, |
343 | 343 |
344 /** | 344 /** |
345 * @param {!chrome.networkingPrivate.ThirdPartyVPNProperties} provider | 345 * @param {!chrome.networkingPrivate.ThirdPartyVPNProperties} provider |
346 * @return {string} | 346 * @return {string} |
347 */ | 347 */ |
348 getAddThirdParrtyVpnLabel_: function(provider) { | 348 getAddThirdParrtyVpnLabel_: function(provider) { |
349 return this.i18n('internetAddThirdPartyVPN', provider.ProviderName); | 349 return this.i18n('internetAddThirdPartyVPN', provider.ProviderName); |
350 } | 350 } |
351 }); | 351 }); |
OLD | NEW |