Closed Bug 1883510 Opened 1 year ago Closed 1 year ago

Prefer StaticPrefs to Preferences in ContentAnalysis

Categories

(Firefox :: Data Loss Prevention, task)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: handyman, Assigned: btsoi)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

No description provided.

When getting preferences, a lot of the code in toolkit/components/contentanalysis does it like this:

Preferences::GetBool(kIsDLPEnabledPref)

In general, the preferred approach is to use the StaticPrefs API, like

StaticPrefs::browser_contentanalysis_enabled()

To make this work, the first step is to edit modules/libpref/init/StaticPrefList.yaml for these variables and make sure they are set to mirror: always. After building Firefox again, this should make the appropriate methods on StaticPrefs get generated.

Assignee: nobody → btsoi
Pushed by cmartin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63dfb37a6550 Change Preferences to StaticPrefs in ContentAnalysis r=cmartin,gstoll,gcp
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: