Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 notify: true, | 26 notify: true, |
| 27 }, | 27 }, |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * Dictionary defining page visibility. | 30 * Dictionary defining page visibility. |
| 31 * @type {!PrivacyPageVisibility} | 31 * @type {!PrivacyPageVisibility} |
| 32 */ | 32 */ |
| 33 pageVisibility: Object, | 33 pageVisibility: Object, |
| 34 | 34 |
| 35 <if expr="_google_chrome and not chromeos"> | 35 <if expr="_google_chrome and not chromeos"> |
| 36 /** @type {MetricsReporting} */ | 36 /** @type {MetricsReporting} */ |
|
dpapad
2016/11/03 01:32:38
?MetricsReporting
Dan Beam
2016/11/03 01:38:32
this isn't initially null, it's undefined
/** @ty
| |
| 37 metricsReporting_: Object, | 37 metricsReporting_: Object, |
| 38 | |
| 39 showRestart_: Boolean, | |
| 38 </if> | 40 </if> |
| 39 | 41 |
| 40 /** @private */ | 42 /** @private */ |
| 41 showClearBrowsingDataDialog_: Boolean, | 43 showClearBrowsingDataDialog_: Boolean, |
| 42 }, | 44 }, |
| 43 | 45 |
| 44 <if expr="_google_chrome"> | 46 <if expr="_google_chrome"> |
| 45 observers: [ | 47 observers: [ |
| 46 'updateSpellingService_(prefs.spellcheck.use_spelling_service.value)', | 48 'updateSpellingService_(prefs.spellcheck.use_spelling_service.value)', |
| 47 ], | 49 ], |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 109 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| 108 var enabled = this.$.metricsReportingCheckbox.checked; | 110 var enabled = this.$.metricsReportingCheckbox.checked; |
| 109 browserProxy.setMetricsReportingEnabled(enabled); | 111 browserProxy.setMetricsReportingEnabled(enabled); |
| 110 }, | 112 }, |
| 111 | 113 |
| 112 /** | 114 /** |
| 113 * @param {!MetricsReporting} metricsReporting | 115 * @param {!MetricsReporting} metricsReporting |
| 114 * @private | 116 * @private |
| 115 */ | 117 */ |
| 116 setMetricsReporting_: function(metricsReporting) { | 118 setMetricsReporting_: function(metricsReporting) { |
| 119 if (this.metricsReporting_) { | |
| 120 // TODO(dbeam): hide if changed back to the value Chrome started with. | |
|
dpapad
2016/11/03 01:32:38
Eh, is that too hard to do now? Just need an extra
Dan Beam
2016/11/03 01:38:32
to do correctly, we need to do this on chrome star
| |
| 121 this.showRestart_ = true; | |
| 122 } | |
| 117 this.metricsReporting_ = metricsReporting; | 123 this.metricsReporting_ = metricsReporting; |
| 118 }, | 124 }, |
| 125 | |
| 126 /** @private */ | |
| 127 onRestartTap_: function() { | |
| 128 settings.LifetimeBrowserProxyImpl.getInstance().restart(); | |
| 129 }, | |
| 119 </if> | 130 </if> |
| 120 | 131 |
| 121 <if expr="_google_chrome"> | 132 <if expr="_google_chrome"> |
| 122 /** @private */ | 133 /** @private */ |
| 123 updateSpellingService_: function() { | 134 updateSpellingService_: function() { |
| 124 this.$.spellingServiceToggleButton.checked = | 135 this.$.spellingServiceToggleButton.checked = |
| 125 this.get('prefs.spellcheck.use_spelling_service.value'); | 136 this.get('prefs.spellcheck.use_spelling_service.value'); |
| 126 }, | 137 }, |
| 127 | 138 |
| 128 /** @private */ | 139 /** @private */ |
| 129 onUseSpellingServiceTap_: function() { | 140 onUseSpellingServiceTap_: function() { |
| 130 this.set('prefs.spellcheck.use_spelling_service.value', | 141 this.set('prefs.spellcheck.use_spelling_service.value', |
| 131 this.$.spellingServiceToggleButton.checked); | 142 this.$.spellingServiceToggleButton.checked); |
| 132 }, | 143 }, |
| 133 </if> | 144 </if> |
| 134 | 145 |
| 135 /** | 146 /** |
| 136 * The sub-page title for the site or content settings. | 147 * The sub-page title for the site or content settings. |
| 137 * @return {string} | 148 * @return {string} |
| 138 * @private | 149 * @private |
| 139 */ | 150 */ |
| 140 siteSettingsPageTitle_: function() { | 151 siteSettingsPageTitle_: function() { |
| 141 return loadTimeData.getBoolean('enableSiteSettings') ? | 152 return loadTimeData.getBoolean('enableSiteSettings') ? |
| 142 loadTimeData.getString('siteSettings') : | 153 loadTimeData.getString('siteSettings') : |
| 143 loadTimeData.getString('contentSettings'); | 154 loadTimeData.getString('contentSettings'); |
| 144 }, | 155 }, |
| 145 }); | 156 }); |
| OLD | NEW |