Confirmed users
908
edits
(→QA: add another PR_LOG envvar) |
(→Engineering: add a walkthrough and mention the code in necko) |
||
| Line 37: | Line 37: | ||
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1149867 Tracking bug] | * [https://bugzilla.mozilla.org/show_bug.cgi?id=1149867 Tracking bug] | ||
* The Firefox implementation is split into | * The Firefox implementation is split into a few parts: | ||
** <tt>browser/components/safebrowsing/</tt> | ** <tt>browser/components/safebrowsing/</tt> | ||
** <tt>netwerk/base/nsChannelClassifier</tt> | |||
** <tt>toolkit/components/url-classifier/</tt> (includes the list manager) | ** <tt>toolkit/components/url-classifier/</tt> (includes the list manager) | ||
* Local store is in: | * Local store is in: | ||
| Line 45: | Line 46: | ||
* [https://github.com/mozilla/itisatrap itisatrap.org] test pages | * [https://github.com/mozilla/itisatrap itisatrap.org] test pages | ||
* [https://people.mozilla.org/~fmarier/safebrowsing-dashboard/ Telemetry dashboard] | * [https://people.mozilla.org/~fmarier/safebrowsing-dashboard/ Telemetry dashboard] | ||
=== Code walkthrough === | |||
Both [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/netwerk/base/nsBaseChannel.cpp#611 nsBaseChannel::Open()] and [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/netwerk/base/nsBaseChannel.cpp#672 nsBaseChannel::AsyncOpen()] ask for the channel to be [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/netwerk/base/nsBaseChannel.cpp#306 "classified"] by | |||
[https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/netwerk/base/nsChannelClassifier.cpp#354 nsChannelClassifier]. There is also a [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/netwerk/protocol/http/nsHttpChannel.cpp#5185 local-only classification] that is requested by [[Security/Tracking protection|tracking protection]]. | |||
The classifier [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp#173 determines the type of URL that it is] and then [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp#988 returns the appropriate NS_ERROR code]. That causes the channel to be [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/netwerk/base/nsChannelClassifier.cpp?offset=200#646 cancelled with that error code]. | |||
When the [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/docshell/base/nsDocShell.cpp#7613 classification state of the page changes], the appropriate UI [https://dxr.mozilla.org/mozilla-central/rev/f8086bd3c84fc1a42c3625cf3cc2253f0a5e8cfd/docshell/base/nsDocShell.cpp#4854 is shown]. | |||
== QA == | == QA == | ||