mozilla-services / screenshots

Firefox Screenshots: the best way to take screenshots on the web.
https://screenshots.firefox.com
Mozilla Public License 2.0
620 stars 128 forks source link

Support `extensions.%NAME%.disabled` #2332

Closed ghost closed 7 years ago

ghost commented 7 years ago

%NAME% is simply whatever we decide to name this thing. Right now it's "pageshot".

Over in #2304 I talk about reporting the status of extensions.pageshot.disabled. This issue is to actually add and implement that preference. This preference should be relatively straight-forward. Check out my sweet pseudocode:

   # Somewhere in an init function:
   if extensions.pageshot.disabled == 1:
     return;

If extensions.pageshot.disabled is missing, we should enable as usual. The point of this pref is to bail as early as possible if it's not enabled so we don't use up any resources loading libraries and what not.

jaredhirsch commented 7 years ago

We have to manually start the webextension from inside the bootstrap.js startup function, so, if the pref is set, we will not start the webextension. I think that should do it.

ghost commented 7 years ago

/cc @gregglind -- this is our plan for rolling out to users slowly in 54. Other than confirming the name of this pref and figuring out the rollout percentages, is there anything else we need to do to coordinate with a shield rollout?

/cc @Standard8 -- just to keep you in the loop. We're planning on shipping with the add-on enabled (according to firefox) but this pref set to 1 (disabled) so the add-on runs, but exits immediately, and then we'll slowly flip the pref off for folks so the feature rolls out.

ianb commented 7 years ago

I'm going to name this extensions.pageshot.systemDisabled to make it clearer how it is different than #2333

Though the prefs will be controlled differently, they will have exactly the same effect. But some people will probably go into about:config and turn them both off just to be Extra Careful.

ghost commented 7 years ago

Sounds good. For the record, once we're done rolling this out (a couple weeks?) we can just remove this pref and the code for it altogether.

jaredhirsch commented 7 years ago

Grabbing a few of these prefs / initialization / disabling bugs