Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Move the ESR check from bootstrap into webextension API #4809

Merged
merged 2 commits into from
Aug 29, 2018

Conversation

jaredhirsch
Copy link
Member

Fixes #4802.

  • Add a webextension experiment API to Screenshots that exposes app update channel
  • Move ESR check from bootstrap to webextension API

Unfortunately, ESR 60 doesn't allow legacy extensions, so there's no way to test this works in that case. But you can set the debugger and see that it returns the correct channel if you test from nightly :-\

Copy link
Contributor

@ianb ianb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I looked at this diff in #4810 which also includes this PR?

Copy link
Collaborator

@chenba chenba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

runAt: "document_start"
return browser.experiments.screenshots.getUpdateChannel().then((channel) => {
return browser.tabs.get(tabId).then(tab => {
const downloadOnly = !historyEnabled || uploadDisabled || channel === 'esr' || tab.incognito;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter is complaining about those single quotes around esr.

@@ -0,0 +1,34 @@
/* globals AppConstants */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need ExtensionAPI in the globals as well.

@jaredhirsch jaredhirsch merged commit c5163ba into master Aug 29, 2018
@jaredhirsch jaredhirsch deleted the 4802-esr-check-api branch August 30, 2018 00:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants