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'], |
+ }; |
}, |
/** |