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

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

Issue 2094223004: MD Settings: make chrome://[md-]settings/clearBrowserData URL work (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 00b0dd17e1868f4b1d697082105af64e4ad9441d..2be88093d580d2547db33dd57f6ad2d7307b3942 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -23,6 +23,7 @@ Polymer({
* The current active route.
*/
currentRoute: {
+ observer: 'currentRouteChanged_',
type: Object,
notify: true,
},
@@ -35,6 +36,18 @@ Polymer({
this.ContentSettingsTypes = settings.ContentSettingsTypes;
},
+ /**
+ * @param {!SettingsRoute} newRoute
+ * @param {!SettingsRoute} oldRoute
+ * @private
+ */
+ currentRouteChanged_: function(newRoute, oldRoute) {
+ if (newRoute.subpage == 'clear-browsing-data')
michaelpg 2016/06/27 19:33:49 add a TODO to not do this
+ this.showClearBrowsingDataDialog_ = true;
+ else if (oldRoute && oldRoute.subpage == 'clear-browsing-data')
+ this.showClearBrowsingDataDialog_ = false;
+ },
+
/** @private */
onManageCertificatesTap_: function() {
<if expr="use_nss_certs">
@@ -53,7 +66,12 @@ Polymer({
/** @private */
onClearBrowsingDataTap_: function() {
- this.showClearBrowsingDataDialog_ = true;
+ this.currentRoute = {
+ url: '/clearBrowserData',
+ page: 'advanced',
+ section: 'privacy',
+ subpage: ['clear-browsing-data'],
+ };
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698