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

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

Issue 2754563002: MD Settings: Lazy load the contents of the "advanced" settings. (Closed)
Patch Set: Address comments. Created 3 years, 9 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 7d02247ac41f455d75716f19944950db897666bd..fa0b68482579a3f41803ee018523cbac05e18c23 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -18,8 +18,16 @@ cr.define('settings', function() {
/** @type {number} */
this.depth = 0;
+ /**
+ * @type {boolean} Whether this route corresponds to a navigable
+ * dialog. Those routes don't belong to a "section".
+ */
+ this.isNavigableDialog = false;
+
// Below are all legacy properties to provide compatibility with the old
- // routing system. TODO(tommycli): Remove once routing refactor complete.
+ // routing system.
+
+ /** @type {string} */
this.section = '';
};
@@ -94,11 +102,16 @@ cr.define('settings', function() {
// Navigable dialogs. These are the only non-section children of root pages.
// These are disfavored. If we add anymore, we should add explicit support.
r.IMPORT_DATA = r.BASIC.createChild('/importData');
+ r.IMPORT_DATA.isNavigableDialog = true;
r.SIGN_OUT = r.BASIC.createChild('/signOut');
+ r.SIGN_OUT.isNavigableDialog = true;
r.CLEAR_BROWSER_DATA = r.ADVANCED.createChild('/clearBrowserData');
+ r.CLEAR_BROWSER_DATA.isNavigableDialog = true;
r.RESET_DIALOG = r.ADVANCED.createChild('/resetProfileSettings');
+ r.RESET_DIALOG.isNavigableDialog = true;
r.TRIGGERED_RESET_DIALOG =
r.ADVANCED.createChild('/triggeredResetProfileSettings');
+ r.TRIGGERED_RESET_DIALOG.isNavigableDialog = true;
// <if expr="chromeos">
r.INTERNET = r.BASIC.createSection('/internet', 'internet');

Powered by Google App Engine
This is Rietveld 408576698