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-privacy-page' is the settings page containing privacy and | 7 * 'settings-privacy-page' is the settings page containing privacy and |
8 * security settings. | 8 * security settings. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 }, | 106 }, |
107 | 107 |
108 /** @private */ | 108 /** @private */ |
109 onHelpTap_: function() { | 109 onHelpTap_: function() { |
110 window.open( | 110 window.open( |
111 'https://support.google.com/chrome/?p=settings_manage_exceptions'); | 111 'https://support.google.com/chrome/?p=settings_manage_exceptions'); |
112 }, | 112 }, |
113 | 113 |
114 // <if expr="_google_chrome and not chromeos"> | 114 // <if expr="_google_chrome and not chromeos"> |
115 /** @private */ | 115 /** @private */ |
116 onMetricsReportingCheckboxTap_: function() { | 116 onMetricsReportingControlTap_: function() { |
117 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 117 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
118 var enabled = this.$.metricsReportingCheckbox.checked; | 118 var enabled = this.$.metricsReportingControl.checked; |
119 browserProxy.setMetricsReportingEnabled(enabled); | 119 browserProxy.setMetricsReportingEnabled(enabled); |
120 }, | 120 }, |
121 | 121 |
122 /** | 122 /** |
123 * @param {!MetricsReporting} metricsReporting | 123 * @param {!MetricsReporting} metricsReporting |
124 * @private | 124 * @private |
125 */ | 125 */ |
126 setMetricsReporting_: function(metricsReporting) { | 126 setMetricsReporting_: function(metricsReporting) { |
127 // TODO(dbeam): remember whether metrics reporting was enabled when Chrome | 127 // TODO(dbeam): remember whether metrics reporting was enabled when Chrome |
128 // started. | 128 // started. |
129 if (metricsReporting.managed) { | 129 if (metricsReporting.managed) { |
130 this.showRestart_ = false; | 130 this.showRestart_ = false; |
131 } else if (this.metricsReporting_ && | 131 } else if (this.metricsReporting_ && |
132 metricsReporting.enabled != this.metricsReporting_.enabled) { | 132 metricsReporting.enabled != this.metricsReporting_.enabled) { |
133 this.showRestart_ = true; | 133 this.showRestart_ = true; |
134 } | 134 } |
135 this.metricsReporting_ = metricsReporting; | 135 this.metricsReporting_ = metricsReporting; |
136 }, | 136 }, |
137 | 137 |
138 /** @private */ | 138 /** @private */ |
139 onRestartTap_: function() { | 139 onRestartTap_: function() { |
140 settings.LifetimeBrowserProxyImpl.getInstance().restart(); | 140 settings.LifetimeBrowserProxyImpl.getInstance().restart(); |
141 }, | 141 }, |
142 // </if> | 142 // </if> |
143 | 143 |
144 /** @private */ | 144 /** @private */ |
145 onSafeBrowsingExtendedReportingCheckboxTap_: function() { | 145 onSafeBrowsingExtendedReportingControlTap_: function() { |
146 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 146 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
147 var enabled = this.$.safeBrowsingExtendedReportingCheckbox.checked; | 147 var enabled = this.$.safeBrowsingExtendedReportingControl.checked; |
148 browserProxy.setSafeBrowsingExtendedReportingEnabled(enabled); | 148 browserProxy.setSafeBrowsingExtendedReportingEnabled(enabled); |
149 }, | 149 }, |
150 | 150 |
151 /** @param {boolean} enabled Whether reporting is enabled or not. | 151 /** @param {boolean} enabled Whether reporting is enabled or not. |
152 * @private | 152 * @private |
153 */ | 153 */ |
154 setSafeBrowsingExtendedReporting_: function(enabled) { | 154 setSafeBrowsingExtendedReporting_: function(enabled) { |
155 this.safeBrowsingExtendedReportingEnabled_ = enabled; | 155 this.safeBrowsingExtendedReportingEnabled_ = enabled; |
156 }, | 156 }, |
157 | 157 |
158 /** | 158 /** |
159 * The sub-page title for the site or content settings. | 159 * The sub-page title for the site or content settings. |
160 * @return {string} | 160 * @return {string} |
161 * @private | 161 * @private |
162 */ | 162 */ |
163 siteSettingsPageTitle_: function() { | 163 siteSettingsPageTitle_: function() { |
164 return loadTimeData.getBoolean('enableSiteSettings') ? | 164 return loadTimeData.getBoolean('enableSiteSettings') ? |
165 loadTimeData.getString('siteSettings') : | 165 loadTimeData.getString('siteSettings') : |
166 loadTimeData.getString('contentSettings'); | 166 loadTimeData.getString('contentSettings'); |
167 }, | 167 }, |
168 | 168 |
169 // <if expr="chromeos"> | 169 // <if expr="chromeos"> |
170 /** @private */ | 170 /** @private */ |
171 onAdobeFlashStorageClicked_: function() { | 171 onAdobeFlashStorageClicked_: function() { |
172 window.open('https://www.macromedia.com/support/' + | 172 window.open('https://www.macromedia.com/support/' + |
173 'documentation/en/flashplayer/help/settings_manager07.html'); | 173 'documentation/en/flashplayer/help/settings_manager07.html'); |
174 }, | 174 }, |
175 // </if> | 175 // </if> |
176 }); | 176 }); |
OLD | NEW |