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

Unified Diff: chrome/browser/ui/webui/md_history_ui.cc

Issue 2224003003: Vulcanize MD History to improve page-load performance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/resources/vulcanize.py ('k') | chrome/test/data/webui/md_history/history_toolbar_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/md_history_ui.cc
diff --git a/chrome/browser/ui/webui/md_history_ui.cc b/chrome/browser/ui/webui/md_history_ui.cc
index f746b8624e9349142d868a5b90ea4dd684fefcff..1d1e4e0ab8c180db675cf84744781484526961a0 100644
--- a/chrome/browser/ui/webui/md_history_ui.cc
+++ b/chrome/browser/ui/webui/md_history_ui.cc
@@ -113,14 +113,26 @@ content::WebUIDataSource* CreateMdHistoryUIHTMLSource(Profile* profile) {
signin_manager->IsAuthenticated();
source->AddBoolean("isUserSignedIn", is_authenticated);
+ source->AddResourcePath("constants.html", IDR_MD_HISTORY_CONSTANTS_HTML);
+ source->AddResourcePath("constants.js", IDR_MD_HISTORY_CONSTANTS_JS);
+ source->AddResourcePath("images/100/sign_in_promo.png",
+ IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_PNG);
+ source->AddResourcePath("images/200/sign_in_promo.png",
+ IDR_MD_HISTORY_IMAGES_200_SIGN_IN_PROMO_PNG);
+ source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS);
+
+#if BUILDFLAG(USE_VULCANIZE)
+ source->AddResourcePath("app.html",
+ IDR_MD_HISTORY_APP_VULCANIZED_HTML);
+ source->AddResourcePath("app.crisper.js",
+ IDR_MD_HISTORY_APP_CRISPER_JS);
+#else
source->AddResourcePath("app.html", IDR_MD_HISTORY_APP_HTML);
source->AddResourcePath("app.js", IDR_MD_HISTORY_APP_JS);
source->AddResourcePath("browser_service.html",
IDR_MD_HISTORY_BROWSER_SERVICE_HTML);
source->AddResourcePath("browser_service.js",
IDR_MD_HISTORY_BROWSER_SERVICE_JS);
- source->AddResourcePath("constants.html", IDR_MD_HISTORY_CONSTANTS_HTML);
- source->AddResourcePath("constants.js", IDR_MD_HISTORY_CONSTANTS_JS);
source->AddResourcePath("grouped_list.html",
IDR_MD_HISTORY_GROUPED_LIST_HTML);
source->AddResourcePath("grouped_list.js", IDR_MD_HISTORY_GROUPED_LIST_JS);
@@ -138,12 +150,7 @@ content::WebUIDataSource* CreateMdHistoryUIHTMLSource(Profile* profile) {
IDR_MD_HISTORY_HISTORY_TOOLBAR_HTML);
source->AddResourcePath("history_toolbar.js",
IDR_MD_HISTORY_HISTORY_TOOLBAR_JS);
- source->AddResourcePath("history.js", IDR_MD_HISTORY_HISTORY_JS);
source->AddResourcePath("icons.html", IDR_MD_HISTORY_ICONS_HTML);
- source->AddResourcePath("images/100/sign_in_promo.png",
- IDR_MD_HISTORY_IMAGES_100_SIGN_IN_PROMO_PNG);
- source->AddResourcePath("images/200/sign_in_promo.png",
- IDR_MD_HISTORY_IMAGES_200_SIGN_IN_PROMO_PNG);
source->AddResourcePath("lazy_render.html",
IDR_MD_HISTORY_LAZY_RENDER_HTML);
source->AddResourcePath("lazy_render.js",
@@ -168,6 +175,7 @@ content::WebUIDataSource* CreateMdHistoryUIHTMLSource(Profile* profile) {
IDR_MD_HISTORY_SYNCED_DEVICE_MANAGER_HTML);
source->AddResourcePath("synced_device_manager.js",
IDR_MD_HISTORY_SYNCED_DEVICE_MANAGER_JS);
+#endif // BUILDFLAG(USE_VULCANIZE)
source->SetDefaultResource(IDR_MD_HISTORY_HISTORY_HTML);
source->SetJsonPath("strings.js");
« no previous file with comments | « chrome/browser/resources/vulcanize.py ('k') | chrome/test/data/webui/md_history/history_toolbar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698