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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 settings.navigateTo(settings.Route.SITE_SETTINGS); | 75 settings.navigateTo(settings.Route.SITE_SETTINGS); |
| 76 }, | 76 }, |
| 77 | 77 |
| 78 /** @private */ | 78 /** @private */ |
| 79 onClearBrowsingDataTap_: function() { | 79 onClearBrowsingDataTap_: function() { |
| 80 settings.navigateTo(settings.Route.CLEAR_BROWSER_DATA); | 80 settings.navigateTo(settings.Route.CLEAR_BROWSER_DATA); |
| 81 }, | 81 }, |
| 82 | 82 |
| 83 /** @private */ | 83 /** @private */ |
| 84 onDialogClosed_: function() { | 84 onDialogClosed_: function() { |
| 85 settings.navigateTo(settings.Route.PRIVACY); | 85 // Opening the dialog performs a navigation, but not necessarily from |
| 86 // PRIVACY section. Browser Back restores the old route without scrolling. | |
| 87 window.history.back(); | |
|
michaelpg
2016/08/16 23:28:02
Seems like a behavior the router should be respons
tommycli
2016/08/16 23:50:08
Done.
Yes you are absolutely correct here. I real
| |
| 86 }, | 88 }, |
| 87 | 89 |
| 88 <if expr="_google_chrome and not chromeos"> | 90 <if expr="_google_chrome and not chromeos"> |
| 89 /** @private */ | 91 /** @private */ |
| 90 onMetricsReportingCheckboxTap_: function() { | 92 onMetricsReportingCheckboxTap_: function() { |
| 91 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 93 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| 92 var enabled = this.$.metricsReportingCheckbox.checked; | 94 var enabled = this.$.metricsReportingCheckbox.checked; |
| 93 browserProxy.setMetricsReportingEnabled(enabled); | 95 browserProxy.setMetricsReportingEnabled(enabled); |
| 94 }, | 96 }, |
| 95 | 97 |
| 96 /** | 98 /** |
| 97 * @param {!MetricsReporting} metricsReporting | 99 * @param {!MetricsReporting} metricsReporting |
| 98 * @private | 100 * @private |
| 99 */ | 101 */ |
| 100 setMetricsReporting_: function(metricsReporting) { | 102 setMetricsReporting_: function(metricsReporting) { |
| 101 this.metricsReporting_ = metricsReporting; | 103 this.metricsReporting_ = metricsReporting; |
| 102 }, | 104 }, |
| 103 </if> | 105 </if> |
| 104 }); | 106 }); |
| OLD | NEW |