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

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

Issue 2103653004: Revert of 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
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 f8a2b7a5644efa698c991bcacf32f62a9fed4dd0..00b0dd17e1868f4b1d697082105af64e4ad9441d 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.js
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.js
@@ -28,41 +28,17 @@
},
/** @private */
- showClearBrowsingDataDialog_: {
- computed: 'computeShowClearBrowsingDataDialog_(currentRoute)',
- type: Boolean,
- },
+ showClearBrowsingDataDialog_: Boolean,
},
ready: function() {
this.ContentSettingsTypes = settings.ContentSettingsTypes;
},
- /** @suppress {missingProperties} */
- attached: function() {
- settings.main.rendered.then(function() {
michaelpg 2016/06/29 01:54:40 Haha, I guess that's what happens when you suppres
Dan Beam 2016/06/29 20:42:49 tests aren't compiled
michaelpg 2016/06/29 21:03:29 I didn't mean to imply causality per se. "And that
- if (this.showClearBrowsingDataDialog_) {
- var dialog = this.$$('settings-clear-browsing-data-dialog').$.dialog;
- // TODO(dbeam): cast to a CrDialogElement when it compiles.
- 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.dialog == 'clear-browsing-data';
- },
-
/** @private */
onManageCertificatesTap_: function() {
<if expr="use_nss_certs">
- var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages);
- pages.setSubpageChain(['manage-certificates']);
+ this.$.pages.setSubpageChain(['manage-certificates']);
</if>
<if expr="is_win or is_macosx">
settings.PrivacyPageBrowserProxyImpl.getInstance().
@@ -72,18 +48,12 @@
/** @private */
onSiteSettingsTap_: function() {
- var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages);
- pages.setSubpageChain(['site-settings']);
+ this.$.pages.setSubpageChain(['site-settings']);
},
/** @private */
onClearBrowsingDataTap_: function() {
- this.currentRoute = {
- page: this.currentRoute.page,
- section: this.currentRoute.section,
- subpage: this.currentRoute.subpage,
- dialog: 'clear-browsing-data',
- };
+ this.showClearBrowsingDataDialog_ = true;
},
/**
@@ -91,14 +61,7 @@
* @private
*/
onIronOverlayClosed_: function(event) {
- if (Polymer.dom(event).rootTarget.tagName != 'CR-DIALOG')
- return;
-
- this.currentRoute = {
- page: this.currentRoute.page,
- section: this.currentRoute.section,
- subpage: this.currentRoute.subpage,
- // Drop dialog key.
- };
+ if (Polymer.dom(event).rootTarget.tagName == 'CR-DIALOG')
+ this.showClearBrowsingDataDialog_ = false;
},
});

Powered by Google App Engine
This is Rietveld 408576698