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

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: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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({
11 is: 'settings-privacy-page', 11 is: 'settings-privacy-page',
12 12
13 properties: { 13 properties: {
14 /** 14 /**
15 * Preferences state. 15 * Preferences state.
16 */ 16 */
17 prefs: { 17 prefs: {
18 type: Object, 18 type: Object,
19 notify: true, 19 notify: true,
20 }, 20 },
21 21
22 /** 22 /**
23 * The current active route. 23 * The current active route.
24 */ 24 */
25 currentRoute: { 25 currentRoute: {
26 observer: 'currentRouteChanged_',
26 type: Object, 27 type: Object,
27 notify: true, 28 notify: true,
28 }, 29 },
29 30
30 /** @private */ 31 /** @private */
31 showClearBrowsingDataDialog_: Boolean, 32 showClearBrowsingDataDialog_: Boolean,
32 }, 33 },
33 34
34 ready: function() { 35 ready: function() {
35 this.ContentSettingsTypes = settings.ContentSettingsTypes; 36 this.ContentSettingsTypes = settings.ContentSettingsTypes;
36 }, 37 },
37 38
39 /**
40 * @param {!SettingsRoute} newRoute
41 * @param {!SettingsRoute} oldRoute
42 * @private
43 */
44 currentRouteChanged_: function(newRoute, oldRoute) {
45 if (newRoute.subpage == 'clear-browsing-data')
michaelpg 2016/06/27 19:33:49 add a TODO to not do this
46 this.showClearBrowsingDataDialog_ = true;
47 else if (oldRoute && oldRoute.subpage == 'clear-browsing-data')
48 this.showClearBrowsingDataDialog_ = false;
49 },
50
38 /** @private */ 51 /** @private */
39 onManageCertificatesTap_: function() { 52 onManageCertificatesTap_: function() {
40 <if expr="use_nss_certs"> 53 <if expr="use_nss_certs">
41 this.$.pages.setSubpageChain(['manage-certificates']); 54 this.$.pages.setSubpageChain(['manage-certificates']);
42 </if> 55 </if>
43 <if expr="is_win or is_macosx"> 56 <if expr="is_win or is_macosx">
44 settings.PrivacyPageBrowserProxyImpl.getInstance(). 57 settings.PrivacyPageBrowserProxyImpl.getInstance().
45 showManageSSLCertificates(); 58 showManageSSLCertificates();
46 </if> 59 </if>
47 }, 60 },
48 61
49 /** @private */ 62 /** @private */
50 onSiteSettingsTap_: function() { 63 onSiteSettingsTap_: function() {
51 this.$.pages.setSubpageChain(['site-settings']); 64 this.$.pages.setSubpageChain(['site-settings']);
52 }, 65 },
53 66
54 /** @private */ 67 /** @private */
55 onClearBrowsingDataTap_: function() { 68 onClearBrowsingDataTap_: function() {
56 this.showClearBrowsingDataDialog_ = true; 69 this.currentRoute = {
70 url: '/clearBrowserData',
71 page: 'advanced',
72 section: 'privacy',
73 subpage: ['clear-browsing-data'],
74 };
57 }, 75 },
58 76
59 /** 77 /**
60 * @param {!Event} event 78 * @param {!Event} event
61 * @private 79 * @private
62 */ 80 */
63 onIronOverlayClosed_: function(event) { 81 onIronOverlayClosed_: function(event) {
64 if (Polymer.dom(event).rootTarget.tagName == 'CR-DIALOG') 82 if (Polymer.dom(event).rootTarget.tagName == 'CR-DIALOG')
65 this.showClearBrowsingDataDialog_ = false; 83 this.showClearBrowsingDataDialog_ = false;
66 }, 84 },
67 }); 85 });
OLDNEW
« 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