Commit 96e82657 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Compress IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML

Noticed during milestone binary size review.

Bug: 982762
Change-Id: If14512c734f726ad6bc74feb539d954ca177eb21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1803394
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697603}
parent 6d48f36b
...@@ -5304,6 +5304,9 @@ grit("resources") { ...@@ -5304,6 +5304,9 @@ grit("resources") {
# The .grd contains references to generated files. # The .grd contains references to generated files.
source_is_generated = true source_is_generated = true
# Allow compress="brotli". Used in supervised_user_error_page_resources.grdp.
use_brotli = enable_supervised_users
defines = chrome_grit_defines defines = chrome_grit_defines
if (enable_hangout_services_extension) { if (enable_hangout_services_extension) {
defines += [ "enable_hangout_services_extension" ] defines += [ "enable_hangout_services_extension" ]
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<grit-part> <grit-part>
<include name="IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML" file="supervised_user/supervised_user_error_page/resources/supervised_user_block_interstitial.html" flattenhtml="true" type="BINDATA" /> <include name="IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML" file="supervised_user/supervised_user_error_page/resources/supervised_user_block_interstitial.html" flattenhtml="true" type="BINDATA" compress="brotli" />
</grit-part> </grit-part>
...@@ -172,9 +172,8 @@ std::string BuildHtml(bool allow_access_requests, ...@@ -172,9 +172,8 @@ std::string BuildHtml(bool allow_access_requests,
strings.SetString("requestFailedMessage", request_failed_message); strings.SetString("requestFailedMessage", request_failed_message);
webui::SetLoadTimeDataDefaults(app_locale, &strings); webui::SetLoadTimeDataDefaults(app_locale, &strings);
std::string html = std::string html =
ui::ResourceBundle::GetSharedInstance() ui::ResourceBundle::GetSharedInstance().DecompressDataResource(
.GetRawDataResource(IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML) IDR_SUPERVISED_USER_BLOCK_INTERSTITIAL_HTML);
.as_string();
webui::AppendWebUiCssTextDefaults(&html); webui::AppendWebUiCssTextDefaults(&html);
std::string error_html = webui::GetI18nTemplateHtml(html, &strings); std::string error_html = webui::GetI18nTemplateHtml(html, &strings);
return error_html; return error_html;
......
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