Closed
Bug 1025965
Opened 10 years ago
Closed 8 years ago
Rename browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled
Categories
(Toolkit :: Safe Browsing, defect, P5)
Toolkit
Safe Browsing
Tracking
()
VERIFIED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | verified |
People
(Reporter: emorley, Assigned: tnguyen)
References
Details
Attachments
(2 files, 3 obsolete files)
24.70 KB,
patch
|
francois
:
review+
|
Details | Diff | Splinter Review |
5.92 KB,
patch
|
tnguyen
:
review+
|
Details | Diff | Splinter Review |
In bug 1025358, the reporter believed that setting the pref browser.safebrowsing.enabled to false would disable safebrowsing entirely, whereas in fact it only controls the safebrowsing phishing protection, and browser.safebrowsing.malware.enabled needed to be set to false too.
To avoid this confusion, I suggest we rename browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled, otherwise it implies that browser.safebrowsing.enabled is a superset of browser.safebrowsing.malware.enabled.
If we do this, we will need to migrate the pref state from old profiles.
Comment 1•10 years ago
|
||
I think the problem is too many prefs. If someone doesn't trust safebrowsing, there's no reason to enable it only for phishing and not malware (or vice versa). In fact, only ~1% of users touch these prefs at all (http://monica-at-mozilla.blogspot.com/2013/02/writing-for-98.html).
It would make more sense to consolidate into a single pref, browser.safebrowsing.enabled, and make it easier for people who don't want it to turn it off.
Reporter | ||
Comment 2•10 years ago
|
||
That sgtm as well :-)
Comment 3•10 years ago
|
||
I agree, but I do think you want a separate pref for the new download protection. (I suggested making this change in the real UX instead of about:config and you rebuffed me :-)
Comment 4•10 years ago
|
||
(In reply to Gian-Carlo Pascutto [:gcp] from comment #3)
> I agree, but I do think you want a separate pref for the new download
> protection. (I suggested making this change in the real UX instead of
> about:config and you rebuffed me :-)
Sorry, I still disagree :) Having yet another pref sounds even more unusable. If you don't trust Google, you shouldn't use their services. Besides, if someone really wants to turn off the download protection then a pref already exists (the apprepURL one) to turn it off.
Comment 5•9 years ago
|
||
Thomas, is this something you'd like to take a look at?
I suggest keeping the change to a minimum and simply renaming browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled. This will be a rather large change because we need to update all of the tests that rely on this. dxr.mozilla.org is your friend :)
Priority: -- → P5
Assignee | ||
Comment 6•9 years ago
|
||
Sure, I will take it
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → tnguyen
Comment 7•9 years ago
|
||
When you rename a preference just for naming clarity, you also need to add code to nsBrowserGlue.js to migrate the previous value. This ensures that users who had previously disabled the preference don't find it enabled unexpectedly. Example:
http://mxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js?rev=a07ea7fb572f#2090
Firefox for Android may need migration code as well, but I'm not sure how that is handled.
Assignee | ||
Comment 8•9 years ago
|
||
Assignee | ||
Comment 9•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8750233 -
Flags: review?(francois)
Assignee | ||
Updated•9 years ago
|
Attachment #8750235 -
Flags: review?(francois)
Comment 10•9 years ago
|
||
Comment on attachment 8750235 [details] [diff] [review]
Part 2 : migrate pref
Review of attachment 8750235 [details] [diff] [review]:
-----------------------------------------------------------------
That looks good to me, but I'll let Paolo have a quick look too since I didn't know about BrowserGlue before he mentioned it.
::: browser/components/nsBrowserGlue.js
@@ +2198,5 @@
> }
>
> + if (currentUIVersion < 38) {
> + const kOldSafeBrowsingPref = "browser.safebrowsing.enabled";
> + // Default value is set to true, a has user pref means that the pref was
typo: the word "has" should probably not be there
::: mobile/android/chrome/content/browser.js
@@ +1030,5 @@
> }
>
> + if (currentUIVersion < 3) {
> + const kOldSafeBrowsingPref = "browser.safebrowsing.enabled";
> + // Default value is set to true, a has user pref means that the pref was
same typo with the word "has"
Attachment #8750235 -
Flags: review?(francois) → review?(paolo.mozmail)
Comment 11•9 years ago
|
||
Comment on attachment 8750233 [details] [diff] [review]
Part 1 : Rename pref
Review of attachment 8750233 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
In terms of testing, you can run:
mach test toolkit/components/url-classifier
mach test browser/components/safe-browsing
and then all of the browser/base/content/test/general/browser_trackingUI_* tests too, just to make sure.
I would also do a try run on Windows, Mac, Linux and Android to make sure everything is fine there too.
Attachment #8750233 -
Flags: review?(francois) → review+
Assignee | ||
Comment 12•9 years ago
|
||
Thanks Francois.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5f803013d8b5&selectedJob=20399507
Updated part 2 because there's a failure on try on Android 4.3
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8750235 -
Attachment is obsolete: true
Attachment #8750235 -
Flags: review?(paolo.mozmail)
Attachment #8751061 -
Flags: review?(paolo.mozmail)
Assignee | ||
Comment 14•9 years ago
|
||
Attachment #8751061 -
Attachment is obsolete: true
Attachment #8751061 -
Flags: review?(paolo.mozmail)
Attachment #8751062 -
Flags: review?(paolo.mozmail)
Comment 15•9 years ago
|
||
Comment on attachment 8751062 [details] [diff] [review]
Part 2 : migrate pref
Review of attachment 8751062 [details] [diff] [review]:
-----------------------------------------------------------------
The code looks good to me, make sure you also test the migration manually.
Attachment #8751062 -
Flags: review?(paolo.mozmail) → review+
Comment 16•9 years ago
|
||
I've marked this bug for front-end QA as well, here is an overview of what to test:
1. Create a clean profile with a previous version of the browser
2. Switch the phishing preference from the Preferences window
3. Update to the new version and check the preference remains the same
4. Check that there are no errors from nsBrowserGlue.js in the Browser Console.
5. Repeat the above, but skip step 2.
Flags: qe-verify+
Updated•9 years ago
|
QA Contact: mwobensmith
Assignee | ||
Comment 17•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d8b7901919fa&selectedJob=22754126
Try looks good
Flags: needinfo?(paolo.mozmail)
Assignee | ||
Comment 18•8 years ago
|
||
Rebase and carry r+
Attachment #8751062 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8764502 -
Flags: review+
Updated•8 years ago
|
Flags: needinfo?(paolo.mozmail)
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 19•8 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/4284721d82dd
Rename browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled. r=francios
https://hg.mozilla.org/integration/fx-team/rev/13aad7c0cfda
Migrate browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled. r=paolo.mozmail
Keywords: checkin-needed
Blocks: 1282506
Updated•8 years ago
|
Comment 20•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4284721d82dd
https://hg.mozilla.org/mozilla-central/rev/13aad7c0cfda
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment 21•8 years ago
|
||
Verified fixed on Nightly 50.0a1, 2016-07-12.
I checked preferences via about:config, plus used the test in comment 16 (thanks).
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•