Gzip WebUI resources for many pages
The resource pack is not compressed in the Chrome APK and so any WebUI
resources we can serve gzipped will have a direct impact on the size of
the binary. This change does not gzip all the resources but does so for
a good number of them, resulting in at least 143 kB of savings. I have
manually tested that the affected pages appear unaffected by this
change.
Bug: None
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ic1c7d878644539ca887a9fb393c1fd0cdacea866
Reviewed-on: https://chromium-review.googlesource.com/745302
Reviewed-by: Bernhard Bauer <[email protected]>
Reviewed-by: Mike Pinkerton <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#514699}
diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc
index 9642a7c..02eb8c2 100644
--- a/chrome/browser/ui/webui/policy_ui.cc
+++ b/chrome/browser/ui/webui/policy_ui.cc
@@ -57,6 +57,7 @@
source->AddResourcePath("policy_base.js", IDR_POLICY_BASE_JS);
source->AddResourcePath("policy.js", IDR_POLICY_JS);
source->SetDefaultResource(IDR_POLICY_HTML);
+ source->UseGzip();
return source;
}