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

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: fix merge 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..1134a53be28525b4e8e2f16d129b68a38e78db3b 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,10 @@ 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() {
+ this.showClearBrowsingDataDialog_ =
+ settings.getCurrentRoute().dialog == 'clear-browsing-data';
},
/** @private */
« no previous file with comments | « chrome/browser/resources/settings/privacy_page/privacy_page.html ('k') | chrome/browser/resources/settings/route.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698