Commit 283cc917 authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

WebUI: compress about_os_credits

Bug: 965089
Change-Id: I1a29243c5dd4ab9a446baa7c4ddebb3408e7f5dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1875485Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709046}
parent cda7b03e
......@@ -406,7 +406,7 @@
<include name="IDR_MOBILE_SETUP_PORTAL_PAGE_HTML" file="resources\chromeos\mobile_setup_portal.html" flattenhtml="true" type="BINDATA" compress="gzip" />
<include name="IDR_ECHO_MANIFEST" file="resources\chromeos\echo\manifest.json" type="BINDATA" />
<include name="IDR_OS_CREDITS_HTML" file="resources\chromeos\about_os_credits.html" flattenhtml="true" type="BINDATA" />
<include name="IDR_OS_CREDITS_HTML" file="resources\chromeos\about_os_credits.html" flattenhtml="true" type="BINDATA" compress="gzip" />
<if expr="optimize_webui">
<then>
<include name="IDR_INTERNET_CONFIG_DIALOG_VULCANIZED_HTML" file="${root_gen_dir}\chrome\browser\resources\chromeos\internet_config_dialog\vulcanized.html" use_base_dir="false" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
......
......@@ -411,9 +411,9 @@ class ChromeOSCreditsHandler
DCHECK_CURRENTLY_ON(BrowserThread::UI);
// If we fail to load Chrome OS credits from disk, load it from resources.
if (contents_.empty() && path_ != kKeyboardUtilsPath) {
contents_ = ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_OS_CREDITS_HTML)
.as_string();
contents_ =
ui::ResourceBundle::GetSharedInstance().DecompressDataResource(
IDR_OS_CREDITS_HTML);
}
callback_.Run(base::RefCountedString::TakeString(&contents_));
}
......@@ -481,9 +481,9 @@ class LinuxCreditsHandler
// resources.
// TODO(rjwright): Add a linux-specific placeholder in resources.
if (contents_.empty() && path_ != kKeyboardUtilsPath) {
contents_ = ui::ResourceBundle::GetSharedInstance()
.GetRawDataResource(IDR_OS_CREDITS_HTML)
.as_string();
contents_ =
ui::ResourceBundle::GetSharedInstance().DecompressDataResource(
IDR_OS_CREDITS_HTML);
}
callback_.Run(base::RefCountedString::TakeString(&contents_));
}
......
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