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

Side by Side 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: compiler Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-privacy-page' is the settings page containing privacy and 7 * 'settings-privacy-page' is the settings page containing privacy and
8 * security settings. 8 * security settings.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 10 matching lines...) Expand all
21 21
22 /** 22 /**
23 * The current active route. 23 * The current active route.
24 */ 24 */
25 currentRoute: { 25 currentRoute: {
26 type: Object, 26 type: Object,
27 notify: true, 27 notify: true,
28 }, 28 },
29 29
30 /** @private */ 30 /** @private */
31 showClearBrowsingDataDialog_: Boolean, 31 showClearBrowsingDataDialog_: {
32 computed: 'computeShowClearBrowsingDataDialog_(currentRoute)',
33 type: Boolean,
34 },
32 }, 35 },
33 36
34 ready: function() { 37 ready: function() {
35 this.ContentSettingsTypes = settings.ContentSettingsTypes; 38 this.ContentSettingsTypes = settings.ContentSettingsTypes;
36 }, 39 },
37 40
41 /** @suppress {missingProperties} */
42 attached: function() {
43 if (this.showClearBrowsingDataDialog_) {
44 settings.main.rendered.then(function() {
45 var dialog = this.$$('settings-clear-browsing-data-dialog').$.dialog;
46 // TODO(dbeam): cast to a CrDialogElement when it compiles.
47 dialog.refit();
48 }.bind(this));
49 }
50 },
51
52 /**
53 * @return {boolean} Whether the Clear Browsing Data dialog should be showing.
54 * @private
55 */
56 computeShowClearBrowsingDataDialog_: function() {
57 var route = this.currentRoute;
58 return route && route.subpage && route.subpage[0] == 'clear-browsing-data';
59 },
60
38 /** @private */ 61 /** @private */
39 onManageCertificatesTap_: function() { 62 onManageCertificatesTap_: function() {
40 <if expr="use_nss_certs"> 63 <if expr="use_nss_certs">
41 this.$.pages.setSubpageChain(['manage-certificates']); 64 var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages);
65 pages.setSubpageChain(['manage-certificates']);
42 </if> 66 </if>
43 <if expr="is_win or is_macosx"> 67 <if expr="is_win or is_macosx">
44 settings.PrivacyPageBrowserProxyImpl.getInstance(). 68 settings.PrivacyPageBrowserProxyImpl.getInstance().
45 showManageSSLCertificates(); 69 showManageSSLCertificates();
46 </if> 70 </if>
47 }, 71 },
48 72
49 /** @private */ 73 /** @private */
50 onSiteSettingsTap_: function() { 74 onSiteSettingsTap_: function() {
51 this.$.pages.setSubpageChain(['site-settings']); 75 var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages);
76 pages.setSubpageChain(['site-settings']);
52 }, 77 },
53 78
54 /** @private */ 79 /** @private */
55 onClearBrowsingDataTap_: function() { 80 onClearBrowsingDataTap_: function() {
56 this.showClearBrowsingDataDialog_ = true; 81 this.showClearBrowsingDataDialog_ = true;
michaelpg 2016/06/28 13:58:08 wat
michaelpg 2016/06/28 17:27:59 I don't understand how this works -- you shouldn't
Dan Beam 2016/06/28 19:07:52 Done.
57 }, 82 },
58 83
59 /** 84 /**
60 * @param {!Event} event 85 * @param {!Event} event
61 * @private 86 * @private
62 */ 87 */
63 onIronOverlayClosed_: function(event) { 88 onIronOverlayClosed_: function(event) {
64 if (Polymer.dom(event).rootTarget.tagName == 'CR-DIALOG') 89 if (Polymer.dom(event).rootTarget.tagName == 'CR-DIALOG')
65 this.showClearBrowsingDataDialog_ = false; 90 this.showClearBrowsingDataDialog_ = false;
michaelpg 2016/06/28 13:58:08 wat
Dan Beam 2016/06/28 19:07:52 Done.
66 }, 91 },
67 }); 92 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698