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 4919fe2d885bc1ea076c73f3e5ba8ad80df60afb..2f85b814fca141ec6111cf5630073122a78990da 100644 |
| --- a/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js |
| @@ -10,6 +10,8 @@ |
| Polymer({ |
| is: 'settings-privacy-page', |
| + behaviors: [settings.RouteObserverBehavior], |
| + |
| properties: { |
| /** |
| * Preferences state. |
| @@ -19,19 +21,8 @@ Polymer({ |
| notify: true, |
| }, |
| - /** |
| - * The current active route. |
| - */ |
| - currentRoute: { |
| - type: Object, |
| - notify: true, |
| - }, |
| - |
| /** @private */ |
| - showClearBrowsingDataDialog_: { |
| - computed: 'computeShowClearBrowsingDataDialog_(currentRoute)', |
| - type: Boolean, |
| - }, |
| + showClearBrowsingDataDialog_: Boolean, |
| /** |
| * Dictionary defining page visibility. |
| @@ -44,13 +35,11 @@ Polymer({ |
| this.ContentSettingsTypes = settings.ContentSettingsTypes; |
| }, |
| - /** |
| - * @return {boolean} Whether the Clear Browsing Data dialog should be showing. |
| - * @private |
| - */ |
| - computeShowClearBrowsingDataDialog_: function() { |
| - var route = this.currentRoute; |
| - return route && route.dialog == 'clear-browsing-data'; |
| + /** @protected */ |
| + currentRouteChanged: function() { |
|
Dan Beam
2016/08/05 18:25:19
can this be called at a time where |route| would b
tommycli
2016/08/05 18:54:06
Done. |route| is actually never falsy now. It's de
|
| + var route = settings.getCurrentRoute(); |
| + this.showClearBrowsingDataDialog_ = |
| + route && route.dialog == 'clear-browsing-data'; |
| }, |
| /** @private */ |