Support the ability to separate feature toggle and list update in URL classifier
Categories
(Toolkit :: Safe Browsing, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: dimi, Assigned: dimi)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
6.43 KB,
patch
|
Details | Diff | Splinter Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
A requirement from GeckoView is that we should be able to separate the feature(tracking protection, safebrowsing...etc) toggle and list update so each session can decide if a feature is enabled or not and the runtime can define the lists it downloads. Right now feature toggle is controlled by preference and URL classifier also uses the same preference to determine which list to download.
Assignee | ||
Comment 1•5 years ago
|
||
Hi Eugen, As we talked at the All Hands, I created this bug to support separate feature enable and list update. Would you mind checking if my understanding(in description) is correct and is there anything I missed? It would be also great if you can describe more about how you gonna use it to make sure the implementation will fit GeckoView's need, thanks!
Comment 2•5 years ago
|
||
Currently, SafeBrowsing.jsm enables the features and list updates based on the same pref ("privacy.trackingprotection.enabled"). GeckoView doesn't set "privacy.trackingprotection.enabled" to control tracking protection, instead we set nsIDocShell.useTrackingProtection (see bug 1322576) via GeckoSessionSettings. Additionally, we expose a blocklist selection setting in GeckoRuntimeSettings via "urlclassifier.trackingTable". That means, for GeckoView, list selection and updates are handled in the GeckoRuntime while toggling TP on/off is handled per GeckoSession which is subject to its own lifecycle independent from the GeckoRuntime. We would like to remove the current workaround seen in [1], which overrides "privacy.trackingprotection.enabled" with an unrelated GeckoView-only pref which is set by default. The new URLClassifier either needs a proper API to enable/disable features and list updates or at least separated prefs to control list updates and feature activity. [1] https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/SafeBrowsing.jsm#237
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Hi Eugen,
I have a patch that supports "force" update individual feature.
For tracking protection, it will be "browser.safebrowsing.features.trackingprotection.update"
So,
- If is not set, it then depends on the feature's on/off preference to enable/disable update(just like what we have now)
- If it is set, then we enable/disable update accordingly.
Does that work for you?
Assignee | ||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
That sounds good. Would it be safe to toggle those prefs during a running session, would a disable->enable switch force an update immediately?
I assume we want to enable all the relevant prefs in geckoview-prefs.js for now.
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to Eugen Sawin [:esawin] from comment #5)
That sounds good. Would it be safe to toggle those prefs during a running session, would a disable->enable switch force an update immediately?
Yes, it should be safe to toggle those prefs during a session.
A disable-enable won't trigger an update immediately, the "nextupdatetime" should be still the same.
Assignee | ||
Comment 7•5 years ago
|
||
Add preferences "browser.safebrowsing.features.[feature name].update".
Normally these preferences won't be set so the SafeBrowsing uses features's
enable/disable preferences to decide if it should update the list or
not.
If an update preference is present, then it has higher priority then the
enable/disable one.
This provides a way for the SafeBrowsing consumer to be able to separate
feature toggle and upodate.
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f86cea87bf82 Support the ability to separate feature toggle and list update in URL classifier. r=gcp
Comment 9•5 years ago
|
||
bugherder |
Description
•