Commit 9d654b60 authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

WebUI: History: gzip additional resources

This isn't a huge gain, but it's something, and I'm not aware of any
reason not to compress these.

Bug: 965089
Change-Id: I3931f406f7d78b8e01ed25324dfa89f675874ebb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872993
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarDan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708282}
parent d18df846
......@@ -219,13 +219,13 @@
<if expr="not is_android">
<!-- History. -->
<include name="IDR_HISTORY_CONSTANTS_HTML" file="resources\history\constants.html" type="BINDATA" />
<include name="IDR_HISTORY_CONSTANTS_JS" file="resources\history\constants.js" type="BINDATA" />
<include name="IDR_HISTORY_CONSTANTS_HTML" file="resources\history\constants.html" compress="gzip" type="BINDATA" />
<include name="IDR_HISTORY_CONSTANTS_JS" file="resources\history\constants.js" compress="gzip" type="BINDATA" />
<include name="IDR_HISTORY_HISTORY_HTML" file="resources\history\history.html" preprocess="true" type="BINDATA" compress="gzip" />
<include name="IDR_HISTORY_HISTORY_JS" file="resources\history\history.js" type="BINDATA" />
<include name="IDR_HISTORY_IMAGES_SIGN_IN_PROMO_DARK_SVG" file="resources\history\images\sign_in_promo_dark.svg" type="BINDATA" />
<include name="IDR_HISTORY_IMAGES_SIGN_IN_PROMO_SVG" file="resources\history\images\sign_in_promo.svg" type="BINDATA" />
<include name="IDR_HISTORY_STRINGS_HTML" file="resources\history\strings.html" type="BINDATA" />
<include name="IDR_HISTORY_HISTORY_JS" file="resources\history\history.js" compress="gzip" type="BINDATA" />
<include name="IDR_HISTORY_IMAGES_SIGN_IN_PROMO_DARK_SVG" file="resources\history\images\sign_in_promo_dark.svg" compress="gzip" type="BINDATA" />
<include name="IDR_HISTORY_IMAGES_SIGN_IN_PROMO_SVG" file="resources\history\images\sign_in_promo.svg" compress="gzip" type="BINDATA" />
<include name="IDR_HISTORY_STRINGS_HTML" file="resources\history\strings.html" compress="gzip" type="BINDATA" />
<if expr="optimize_webui">
<then>
<include name="IDR_HISTORY_APP_VULCANIZED_HTML" file="${root_gen_dir}\chrome\browser\resources\history\app.vulcanized.html" preprocess="true" type="BINDATA" compress="gzip" use_base_dir="false" />
......
......@@ -113,11 +113,10 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) {
source->AddBoolean(kIsUserSignedInKey, IsUserSignedIn(profile));
struct UncompressedResource {
const struct {
const char* path;
int idr;
};
const UncompressedResource uncompressed_resources[] = {
} unbundled_resources[] = {
{"constants.html", IDR_HISTORY_CONSTANTS_HTML},
{"constants.js", IDR_HISTORY_CONSTANTS_JS},
{"history.js", IDR_HISTORY_HISTORY_JS},
......@@ -154,7 +153,7 @@ content::WebUIDataSource* CreateHistoryUIHTMLSource(Profile* profile) {
#endif
};
for (const auto& resource : uncompressed_resources) {
for (const auto& resource : unbundled_resources) {
source->AddResourcePath(resource.path, resource.idr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment