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

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

Issue 2156413002: Settings Router Refactor: Migrate to settings.Route.navigateTo calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use timing fix 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({
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/privacy_page/privacy_page.html ('k') | chrome/browser/resources/settings/route.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698