Add an OnChannelBlocked UrlClassifier API
Categories
(Toolkit :: Safe Browsing, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: dimi, Assigned: dimi)
References
Details
Attachments
(3 files, 1 obsolete file)
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
ChannelClassifierService notifies "urlclassifier-before-block-channel"
event when a channel is going to be blocked by protection features.
It also provides an API for receivers to "unblock" the channel.
Sample usage:
this.service = Cc["@mozilla.org/url-classifier/channel-classifier-service;1"].getService(
Ci.nsIChannelClassifierService
);
if (this.service) {
this.service.addListener({
observe(aSubject, aTopic, aData) {
switch (aTopic) {
case "urlclassifier-before-block-channel":
let channel = aSubject.QueryInterface(Ci.nsIUrlClassifierBlockedChannel);
channel.unblock();
break;
}
},
})
}
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D76836
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D76837
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/35567ab8e0ab
https://hg.mozilla.org/mozilla-central/rev/10a7cc5f1b44
https://hg.mozilla.org/mozilla-central/rev/3a5f3040fbef
Description
•