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

Unified Diff: chrome/browser/resources/settings/route.js

Issue 2248083004: Settings: Fix Clear Browsing Data dialog scrolling to Privacy page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/route.js
diff --git a/chrome/browser/resources/settings/route.js b/chrome/browser/resources/settings/route.js
index 61145399564c443aa1cbacc1ebf258f993685994..14b6800a17a0723d604b7b847e0fbc2b8f7938e9 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -74,7 +74,8 @@ cr.define('settings', function() {
* @return {boolean}
*/
isSubpage: function() {
- return !!this.parent && this.parent.section == this.section;
+ return !!this.parent && !!this.section &&
+ this.parent.section == this.section;
},
};
@@ -126,8 +127,7 @@ cr.define('settings', function() {
// CLEAR_BROWSER_DATA is the only navigable dialog route. It's the only child
// of a section that's not a subpage. Don't add any more routes like these.
michaelpg 2016/08/16 23:28:02 Update comment?
tommycli 2016/08/16 23:50:08 Done.
// If more navigable dialogs are needed, add explicit support in Route.
- r.CLEAR_BROWSER_DATA = r.PRIVACY.createChild('/clearBrowserData');
- r.CLEAR_BROWSER_DATA.isSubpage = function() { return false; };
+ r.CLEAR_BROWSER_DATA = r.ADVANCED.createChild('/clearBrowserData');
r.SITE_SETTINGS = r.PRIVACY.createChild('/siteSettings');
r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all');

Powered by Google App Engine
This is Rietveld 408576698