Chromium Code Reviews| Index: chrome/browser/resources/settings/privacy_page/privacy_page.js |
| diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.js b/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| index 8e0c4b029c5ad5253e57388a4c64b732355b14aa..35ccd677302507fd6f197f1bdebf7b0574e40794 100644 |
| --- a/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| @@ -114,8 +114,11 @@ Polymer({ |
| // <if expr="_google_chrome and not chromeos"> |
| /** @private */ |
| onMetricsReportingControlTap_: function() { |
| + if(this.metricsReporting_.managed) |
| + return; |
| + |
| var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| - var enabled = this.$.metricsReportingControl.checked; |
| + var enabled = !this.metricsReporting_.enabled; |
| browserProxy.setMetricsReportingEnabled(enabled); |
| }, |
| @@ -142,9 +145,9 @@ Polymer({ |
| // </if> |
| /** @private */ |
| - onSafeBrowsingExtendedReportingControlTap_: function() { |
| + onSafeBrowsingExtendedReportingControlTap_: function(e) { |
| var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| - var enabled = this.$.safeBrowsingExtendedReportingControl.checked; |
| + var enabled = !this.safeBrowsingExtendedReportingEnabled_; |
|
Dan Beam
2017/02/10 17:20:36
i still don't really understand how this works.
b
scottchen
2017/02/10 18:49:57
You're thinking of the toggle control's "checked"
|
| browserProxy.setSafeBrowsingExtendedReportingEnabled(enabled); |
| }, |
| @@ -184,4 +187,8 @@ Polymer({ |
| getStringTernary_: function(value, trueLabel, falseLabel) { |
| return value ? trueLabel : falseLabel; |
| }, |
| + |
| + doNothing_: function(e) { |
|
scottchen
2017/02/10 07:53:39
This is dipping into the "slightly gross" zone, bu
|
| + e.stopPropagation(); |
| + } |
| }); |