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..636397f48de6df672dbbe00f768847aeedcb397b 100644 |
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js |
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js |
@@ -28,13 +28,33 @@ Polymer({ |
}, |
/** @private */ |
- showClearBrowsingDataDialog_: Boolean, |
+ showClearBrowsingDataDialog_: { |
+ computed: 'computeShowClearBrowsingDataDialog_(currentRoute)', |
+ type: Boolean, |
+ }, |
}, |
ready: function() { |
this.ContentSettingsTypes = settings.ContentSettingsTypes; |
}, |
+ attached: function() { |
+ if (this.showClearBrowsingDataDialog_) { |
+ settings.main.rendered.then(function() { |
+ this.$$('settings-clear-browsing-data-dialog').$.dialog.refit(); |
+ }.bind(this)); |
+ } |
+ }, |
+ |
+ /** |
+ * @return {boolean} Whether the Clear Browsing Data dialog should be showing. |
+ * @private |
+ */ |
+ computeShowClearBrowsingDataDialog_: function() { |
+ var route = this.currentRoute; |
+ return route && route.subpage && route.subpage[0] == 'clear-browsing-data'; |
+ }, |
+ |
/** @private */ |
onManageCertificatesTap_: function() { |
<if expr="use_nss_certs"> |