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

Unified Diff: chrome/browser/resources/help/help.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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/help/help.js
diff --git a/chrome/browser/resources/help/help.js b/chrome/browser/resources/help/help.js
index f03dcdee6b607e083598b66e23d27de580fa32f4..a3d7d1b3a505b6f9612f87eaaff011e79fc3239b 100644
--- a/chrome/browser/resources/help/help.js
+++ b/chrome/browser/resources/help/help.js
@@ -6,46 +6,46 @@
// <include src="../uber/uber_utils.js">
(function() {
- var HelpPage = help.HelpPage;
- var PageManager = cr.ui.pageManager.PageManager;
-
- /**
- * DOMContentLoaded handler, sets up the page.
- */
- function load() {
- PageManager.register(HelpPage.getInstance());
-
- if (help.ChannelChangePage) {
- PageManager.registerOverlay(help.ChannelChangePage.getInstance(),
- HelpPage.getInstance());
- }
- PageManager.addObserver(new uber.PageManagerObserver());
- PageManager.initialize(HelpPage.getInstance());
- uber.onContentFrameLoaded();
-
- var pageName = PageManager.getPageNameFromPath();
- // Still update history so that chrome://help/nonexistant redirects
- // appropriately to chrome://help/. If the URL matches, updateHistory
- // will avoid adding the extra state.
- var updateHistory = true;
- PageManager.showPageByName(pageName, updateHistory, {replaceState: true});
+var HelpPage = help.HelpPage;
+var PageManager = cr.ui.pageManager.PageManager;
+
+/**
+ * DOMContentLoaded handler, sets up the page.
+ */
+function load() {
+ PageManager.register(HelpPage.getInstance());
+
+ if (help.ChannelChangePage) {
+ PageManager.registerOverlay(
+ help.ChannelChangePage.getInstance(), HelpPage.getInstance());
}
-
- document.addEventListener('DOMContentLoaded', load);
-
- /**
- * Listener for the |beforeunload| event.
- */
- window.onbeforeunload = function() {
- PageManager.willClose();
- };
-
- /**
- * Listener for the |popstate| event.
- * @param {Event} e The |popstate| event.
- */
- window.onpopstate = function(e) {
- var pageName = PageManager.getPageNameFromPath();
- PageManager.setState(pageName, location.hash, e.state);
- };
+ PageManager.addObserver(new uber.PageManagerObserver());
+ PageManager.initialize(HelpPage.getInstance());
+ uber.onContentFrameLoaded();
+
+ var pageName = PageManager.getPageNameFromPath();
+ // Still update history so that chrome://help/nonexistant redirects
+ // appropriately to chrome://help/. If the URL matches, updateHistory
+ // will avoid adding the extra state.
+ var updateHistory = true;
+ PageManager.showPageByName(pageName, updateHistory, {replaceState: true});
+}
+
+document.addEventListener('DOMContentLoaded', load);
+
+/**
+ * Listener for the |beforeunload| event.
+ */
+window.onbeforeunload = function() {
+ PageManager.willClose();
+};
+
+/**
+ * Listener for the |popstate| event.
+ * @param {Event} e The |popstate| event.
+ */
+window.onpopstate = function(e) {
+ var pageName = PageManager.getPageNameFromPath();
+ PageManager.setState(pageName, location.hash, e.state);
+};
})();

Powered by Google App Engine
This is Rietveld 408576698