mozilla / doh-rollout

DEPRECATED - Add on for initial DoH rollout
Mozilla Public License 2.0
7 stars 4 forks source link

remove use of ExtensionPreferencesManager #168

Closed mixedpuppy closed 4 years ago

mixedpuppy commented 4 years ago

https://github.com/mozilla/doh-rollout/blob/8ffa1ad1f6123621bf6cb7e6ca356e8139e2654e/src/experiments/preferences/api.js#L18

Given my understanding, the intention is that after uninstall the DOH preferences set are left in place. The safest bet at this point is to do that directly rather than through the ExtensionPreferencesManager. Once a number of bugs are addressed, it is unlikely to work in a way that will fulfill the use case here.

mixedpuppy commented 4 years ago

If you specifically need to know that secure proxy has set the prefs, you could check doing something like:

await ExtensionSettingsStore.initialize();
let control = await ExtensionSettingsStore.getLevelOfControl(
  "secure-proxy@mozilla.com", "prefs", "secureProxy.DNSoverHTTP");
return control === "controlled_by_this_extension";

But if you want to avoid stepping on anything, just checking for a user-set pref for mode would probably do it.

maxxcrawford commented 4 years ago

This has already been removed. @nhnt11 Can you confirm?

nhnt11 commented 4 years ago

Yeah, we're not using EPM anymore.