Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3058)

Unified Diff: chrome/browser/resources/settings/privacy_page/privacy_page.js

Issue 2210933004: Settings Router Refactor: Kill settings-router. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge yet again because this conflicts with everything Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 */

Powered by Google App Engine
This is Rietveld 408576698