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

Side by Side Diff: chrome/browser/resources/settings/privacy_page/privacy_page.js

Issue 2210933004: Settings Router Refactor: Kill settings-router. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge yet again because this conflicts with everything Created 4 years, 4 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({
11 is: 'settings-privacy-page', 11 is: 'settings-privacy-page',
12 12
13 behaviors: [settings.RouteObserverBehavior],
14
13 properties: { 15 properties: {
14 /** 16 /**
15 * Preferences state. 17 * Preferences state.
16 */ 18 */
17 prefs: { 19 prefs: {
18 type: Object, 20 type: Object,
19 notify: true, 21 notify: true,
20 }, 22 },
21 23
22 /**
23 * The current active route.
24 */
25 currentRoute: {
26 type: Object,
27 notify: true,
28 },
29
30 /** @private */ 24 /** @private */
31 showClearBrowsingDataDialog_: { 25 showClearBrowsingDataDialog_: Boolean,
32 computed: 'computeShowClearBrowsingDataDialog_(currentRoute)',
33 type: Boolean,
34 },
35 26
36 /** 27 /**
37 * Dictionary defining page visibility. 28 * Dictionary defining page visibility.
38 * @type {!PrivacyPageVisibility} 29 * @type {!PrivacyPageVisibility}
39 */ 30 */
40 pageVisibility: Object, 31 pageVisibility: Object,
41 }, 32 },
42 33
43 ready: function() { 34 ready: function() {
44 this.ContentSettingsTypes = settings.ContentSettingsTypes; 35 this.ContentSettingsTypes = settings.ContentSettingsTypes;
45 }, 36 },
46 37
47 /** 38 /** @protected */
48 * @return {boolean} Whether the Clear Browsing Data dialog should be showing. 39 currentRouteChanged: function() {
Dan Beam 2016/08/05 18:25:19 can this be called at a time where |route| would b
tommycli 2016/08/05 18:54:06 Done. |route| is actually never falsy now. It's de
49 * @private 40 var route = settings.getCurrentRoute();
50 */ 41 this.showClearBrowsingDataDialog_ =
51 computeShowClearBrowsingDataDialog_: function() { 42 route && route.dialog == 'clear-browsing-data';
52 var route = this.currentRoute;
53 return route && route.dialog == 'clear-browsing-data';
54 }, 43 },
55 44
56 /** @private */ 45 /** @private */
57 onManageCertificatesTap_: function() { 46 onManageCertificatesTap_: function() {
58 <if expr="use_nss_certs"> 47 <if expr="use_nss_certs">
59 settings.navigateTo(settings.Route.CERTIFICATES); 48 settings.navigateTo(settings.Route.CERTIFICATES);
60 </if> 49 </if>
61 <if expr="is_win or is_macosx"> 50 <if expr="is_win or is_macosx">
62 settings.PrivacyPageBrowserProxyImpl.getInstance(). 51 settings.PrivacyPageBrowserProxyImpl.getInstance().
63 showManageSSLCertificates(); 52 showManageSSLCertificates();
64 </if> 53 </if>
65 }, 54 },
66 55
67 /** @private */ 56 /** @private */
68 onSiteSettingsTap_: function() { 57 onSiteSettingsTap_: function() {
69 settings.navigateTo(settings.Route.SITE_SETTINGS); 58 settings.navigateTo(settings.Route.SITE_SETTINGS);
70 }, 59 },
71 60
72 /** @private */ 61 /** @private */
73 onClearBrowsingDataTap_: function() { 62 onClearBrowsingDataTap_: function() {
74 settings.navigateTo(settings.Route.CLEAR_BROWSER_DATA); 63 settings.navigateTo(settings.Route.CLEAR_BROWSER_DATA);
75 }, 64 },
76 65
77 /** @private */ 66 /** @private */
78 onDialogClosed_: function() { 67 onDialogClosed_: function() {
79 settings.navigateTo(settings.Route.PRIVACY); 68 settings.navigateTo(settings.Route.PRIVACY);
80 }, 69 },
81 }); 70 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698