mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 00:35:44 +00:00
e392dbc5dd
This patch changes the way we set and handle the preferred alternate data type. It is no longer just one choice, but a set of preferences, each conditional on the contentType of the resource. For example: var cc = chan.QueryInterface(Ci.nsICacheInfoChannel); cc.preferAlternativeDataType("js-bytecode", "text/javascript"); cc.preferAlternativeDataType("ammended-text", "text/plain"); cc.preferAlternativeDataType("something-else", ""); When loaded from the cache, the available alt-data type will be checked against "js-bytecode" if the contentType is "text/javascript", "ammended-text" if the contentType is "text/plain" or "something-else" for all contentTypes. Note that the alt-data type could be "something-else" even if the contentType is "text/javascript". The preferences are saved as an nsTArray<mozilla::Tuple<nsCString, nsCString>>. Differential Revision: https://phabricator.services.mozilla.com/D8071 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
about | ||
data | ||
file | ||
ftp | ||
gio | ||
http | ||
res | ||
viewsource | ||
websocket | ||
wyciwyg | ||
moz.build |