This repository has been archived by the owner on Dec 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, this page was opened on every 'runtime.onInstalled' event, which includes extension updates and browser updates.
Clicking the 'Uninstall' button on the retirement notice page will prompt the user with a confirmation dialogue before uninstalling the extension.
* Using the web extension 'storage.local' API, store the date of the last update, when the first notice was shown. * Each subsequent startup, check if 30 or more days have passed since the first notice was shown. * If so, show a final notice and store the date that the final notice was shown. * Each subsequent startup, check if 1 or more days have passed since the final notice was shown. * If so, uninstall the extension. This logic can be tested by making use of two new config override prefs by adding them to 'web-ext-config.js', e.g. (replace AT with @): * 'extensions.shopping-testpilotATmozilla.org.initialNoticeDuration=10' * Sets the period between the initial and final retirement notice to 10 seconds. * 'extensions.shopping-testpilotATmozilla.org.finalNoticeDuration=10' * Sets the period between the final retirement notice and self-uninstall to 10 seconds.
Though the same page is used, a query string is passed via the url for the page to indicate if it has been opened as the final notice. This modifies the header and one sentence in the first paragraph to indicate the extension will self-uninstall in one day.
As long as Price Tracker is still listed on AMO, it's possible for users to install Price Tracker after the update is published, and those users should receive the retirement notice as well.
@rhelmer : Ready for your review! I know there are a lot of commits here, but most of them are small. The most important thing to check is that the notice and self-uninstall logic works as expected. I tested this using the "simple 5 step process" (hah) below on unbranded local builds of Nightly, Beta and Release, but I would appreciate a confirmation. We are pushing to publish this final release next Thursday, 8/29 on AMO, so if you can help us achieve that goal with a timely review, that'd be really awesome. Please let me know if you have any questions! You know how to find me. :-) How to test the notice and self-uninstall logic
[1]: diff --git a/toolkit/components/extensions/Extension.jsm b/toolkit/components/extensions/Extension.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -1809,13 +1809,14 @@ class Extension extends ExtensionData {
}
get isPrivileged() {
- return (
- this.addonData.signedState === AddonManager.SIGNEDSTATE_PRIVILEGED ||
- this.addonData.signedState === AddonManager.SIGNEDSTATE_SYSTEM ||
- this.addonData.builtIn ||
- (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS &&
- this.addonData.temporarilyInstalled)
- );
+ return true;
+ // return (
+ // this.addonData.signedState === AddonManager.SIGNEDSTATE_PRIVILEGED ||
+ // this.addonData.signedState === AddonManager.SIGNEDSTATE_SYSTEM ||
+ // this.addonData.builtIn ||
+ // (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS &&
+ // this.addonData.temporarilyInstalled)
+ // );
}
get experimentsAllowed() { |
rhelmer
approved these changes
Aug 26, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On update, opens an extension page in a new tab with a notice that the extension will self-uninstall in 30 days. This page also has a button for the user to uninstall Price Tracker sooner.
After 30 days, on the next startup, a final notice is shown (same as initial notice but with slightly modified wording), and one day later on the next startup, the extension self-uninstalls.
The notice page links to a SUMO article that will persist after the extension is uninstalled and delisted from AMO.
Initial retirement notice
Final retirement notice