OLD | NEW |
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 */ | 61 */ |
62 computeShowClearBrowsingDataDialog_: function() { | 62 computeShowClearBrowsingDataDialog_: function() { |
63 var route = this.currentRoute; | 63 var route = this.currentRoute; |
64 return route && route.dialog == 'clear-browsing-data'; | 64 return route && route.dialog == 'clear-browsing-data'; |
65 }, | 65 }, |
66 | 66 |
67 /** @private */ | 67 /** @private */ |
68 onManageCertificatesTap_: function() { | 68 onManageCertificatesTap_: function() { |
69 <if expr="use_nss_certs"> | 69 <if expr="use_nss_certs"> |
70 var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages); | 70 var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages); |
71 pages.setSubpageChain(['manage-certificates']); | 71 settings.navigateTo(settings.Route.CERTIFICATES); |
72 </if> | 72 </if> |
73 <if expr="is_win or is_macosx"> | 73 <if expr="is_win or is_macosx"> |
74 settings.PrivacyPageBrowserProxyImpl.getInstance(). | 74 settings.PrivacyPageBrowserProxyImpl.getInstance(). |
75 showManageSSLCertificates(); | 75 showManageSSLCertificates(); |
76 </if> | 76 </if> |
77 }, | 77 }, |
78 | 78 |
79 /** @private */ | 79 /** @private */ |
80 onSiteSettingsTap_: function() { | 80 onSiteSettingsTap_: function() { |
81 var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages); | 81 var pages = /** @type {!SettingsAnimatedPagesElement} */(this.$.pages); |
82 pages.setSubpageChain(['site-settings']); | 82 settings.navigateTo(settings.Route.SITE_SETTINGS); |
83 }, | 83 }, |
84 | 84 |
85 /** @private */ | 85 /** @private */ |
86 onClearBrowsingDataTap_: function() { | 86 onClearBrowsingDataTap_: function() { |
87 this.currentRoute = { | 87 settings.navigateTo(settings.Route.CLEAR_BROWSER_DATA); |
88 page: 'advanced', | |
89 section: 'privacy', | |
90 subpage: [], | |
91 dialog: 'clear-browsing-data', | |
92 }; | |
93 }, | 88 }, |
94 | 89 |
95 /** | 90 /** |
96 * @param {!Event} event | 91 * @param {!Event} event |
97 * @private | 92 * @private |
98 */ | 93 */ |
99 onIronOverlayClosed_: function(event) { | 94 onIronOverlayClosed_: function(event) { |
100 if (Polymer.dom(event).rootTarget.tagName != 'CR-DIALOG') | 95 if (Polymer.dom(event).rootTarget.tagName == 'CR-DIALOG') |
101 return; | 96 settings.navigateTo(settings.Route.PRIVACY); |
102 | |
103 this.currentRoute = { | |
104 page: 'advanced', | |
105 section: 'privacy', | |
106 subpage: [], | |
107 // Drop dialog key. | |
108 }; | |
109 }, | 97 }, |
110 }); | 98 }); |
OLD | NEW |