gecko-dev/netwerk/ipc
Valentin Gosu 5ac68030f7 Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke
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 : rebase_source : eb4961f05a52e557e7d2d986d59e0a2cf18a3447
extra : source : dd1c31ea78c2b15d14750d137037a54d50719997
2018-10-17 13:58:30 +00:00
..
ChannelEventQueue.cpp Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
ChannelEventQueue.h Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
NeckoChannelParams.ipdlh Bug 1487100 - Allow calling nsICacheInfoChannel.preferAlternativeDataType(altDataType, contentType) multiple times r=michal,luke 2018-10-17 13:58:30 +00:00
NeckoChild.cpp Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00
NeckoChild.h Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00
NeckoCommon.cpp
NeckoCommon.h Bug 1465294 Part 11 - Don't create Necko children in middleman processes, r=mayhemer. 2018-07-23 14:56:12 +00:00
NeckoMessageUtils.h Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan 2018-09-07 14:47:51 +00:00
NeckoParent.cpp Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00
NeckoParent.h Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00
NeckoTargetHolder.cpp Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
NeckoTargetHolder.h Bug 1343755 - Part 1: Add a helper function in NeckoTargetHolder for dispatching runnable. r=mayhemer, r=jesup 2017-06-20 01:56:00 -04:00
PChannelDiverter.ipdl
PDataChannel.ipdl
PFileChannel.ipdl Bug 1345094 - make http redirects to file:// uris work under e10s. r=mayhemer 2017-04-12 11:43:50 -07:00
PNecko.ipdl Bug 1495285 - Introduce TrackingDummyChannel to annotate channels before being intercepted by ServiceWorkers, r=francois, r=mayhemer, f=asuth 2018-10-12 11:40:36 +02:00
PSimpleChannel.ipdl Bug 1380186 implement SimpleChannel Parent/Child IPC, r=kmag,mayhemer 2017-07-27 13:34:54 -07:00
moz.build Bug 1451859 - Part 2: Add sanitizer coverage to a handful of places relevant to IPC. r=posidron 2018-04-05 15:48:11 -04:00