Chromium Code Reviews| Index: chrome/browser/resources/settings/internet_page/network_proxy.js |
| diff --git a/chrome/browser/resources/settings/internet_page/network_proxy.js b/chrome/browser/resources/settings/internet_page/network_proxy.js |
| index cc22995f52c3f20dfb348eaa2ce54f7be55d6089..25982a6279c93e0791f6c106b3b8879cb887dbf6 100644 |
| --- a/chrome/browser/resources/settings/internet_page/network_proxy.js |
| +++ b/chrome/browser/resources/settings/internet_page/network_proxy.js |
| @@ -37,6 +37,7 @@ Polymer({ |
| value: function() { |
| return this.createDefaultProxySettings_(); |
| }, |
| + observer: 'proxyChanged_', |
| }, |
| /** The Web Proxy Auto Discovery URL extracted from networkProperties. */ |
| @@ -102,9 +103,7 @@ Polymer({ |
| */ |
| savedExcludeDomains_: undefined, |
| - /** |
| - * Polymer networkProperties changed method. |
| - */ |
| + /** @private */ |
| networkPropertiesChanged_: function() { |
| if (!this.networkProperties) |
| return; |
| @@ -147,8 +146,19 @@ Polymer({ |
| this.WPAD = (ipv4 && ipv4.WebProxyAutoDiscoveryUrl) || ''; |
| }, |
| + /** @private */ |
| + proxyChanged_: function() { |
| + this.$.proxyType.value = this.proxy.Type; |
|
dpapad
2016/10/17 22:57:05
Same question here. Can we use a 1-way binding to
stevenjb
2016/10/17 23:58:01
Acknowledged.
|
| + }, |
| + |
| + /** @private */ |
| + useSameProxyChanged_: function() { |
| + this.sendProxyChange_(); |
| + }, |
| + |
| /** |
| * @return {CrOnc.ProxySettings} An empty/default proxy settings object. |
| + * @private |
| */ |
| createDefaultProxySettings_: function() { |
| return { |
| @@ -165,14 +175,8 @@ Polymer({ |
| }, |
| /** |
| - * Polymer useSameProxy changed method. |
| - */ |
| - useSameProxyChanged_: function() { |
| - this.sendProxyChange_(); |
| - }, |
| - |
| - /** |
| * Called when the proxy changes in the UI. |
| + * @private |
| */ |
| sendProxyChange_: function() { |
| if (this.proxy.Type == CrOnc.ProxySettingsType.MANUAL) { |
| @@ -205,12 +209,12 @@ Polymer({ |
| /** |
| * Event triggered when the selected proxy type changes. |
| - * @param {!{detail: !{selected: string}}} e |
| + * @param {!{target: !{value: string}}} e |
| * @private |
| */ |
| onTypeChange_: function(e) { |
| var type = /** @type {chrome.networkingPrivate.ProxySettingsType} */ ( |
| - e.detail.selected); |
| + e.target.value); |
| this.set('proxy.Type', type); |
| this.sendProxyChange_(); |
| }, |