fix: handle gzipped chrome WebUI resources (#18531)

Fixes: #18503
Refs: 1576232

For whatever reason Chromium made this change and then made the default
//content behavior to return false for all IsDataResourceGzipped
requests.  This PR updates our ContentClient impl to return the correct
values.

Notes: Fixed issues where some `chrome://*` URLs would not render
correctly
This commit is contained in:
Samuel Attard 2019-05-31 13:05:35 -07:00 committed by GitHub
parent 81366b5bfb
commit 26155c8a00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -268,4 +268,8 @@ void AtomContentClient::AddContentDecryptionModules(
}
}
bool AtomContentClient::IsDataResourceGzipped(int resource_id) const {
return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
}
} // namespace atom

View file

@ -31,6 +31,7 @@ class AtomContentClient : public content::ContentClient {
void AddContentDecryptionModules(
std::vector<content::CdmInfo>* cdms,
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
bool IsDataResourceGzipped(int resource_id) const override;
private:
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);