gecko-dev/toolkit/mozapps/extensions
Dave Townsend 5537b5c159 Bug 1237820: Track whether a user has been offered a sideloaded add-on or not. r=rhelmer
Previously we just checked every newly sideloaded add-on to decide whether to
offer it to the user for opt-in. This adds a new "seen" property (naming could
be better if you have other suggestions) which tracks whether we've ever shown
the opt-in UI for the add-on. It defaults to true for all add-ons and is only
set to false for sideloaded add-ons that default to being disabled on install.
The seen flag can be set to true through the API but cannot be reset to false
as that would allow add-ons to forcibly re-present themselves to the user when
disabled.

The opt-in UI sets the seen flag to true only when it has focus which fixes a
long-standing bug where if you accept the first add-on you see and restart the
other tabs might not show up.

The one slight downside of this approach is that it now requires loading the
full add-ons database on every startup in order to check the seen flag for all
installed add-ons. There are hacky ways we might get around this but they all
involve overloading prefs with even more object data. The good thing is that
we do the load and check asynchronously after most of startup is complete and
the UI is fully loaded so there shouldn't be any percieved impact to startup
time. I've run multiple talos runs to verify that none of the numbers appear to
regress.

--HG--
extra : commitid : AG6pELCYJDa
extra : rebase_source : b824c1626d0c5a77416fa4349ed3dd4d0e96418b
2016-01-26 14:31:33 -08:00
..
content Bug 1237820: Track whether a user has been offered a sideloaded add-on or not. r=rhelmer 2016-01-26 14:31:33 -08:00
internal Bug 1237820: Track whether a user has been offered a sideloaded add-on or not. r=rhelmer 2016-01-26 14:31:33 -08:00
test Bug 1237820: Track whether a user has been offered a sideloaded add-on or not. r=rhelmer 2016-01-26 14:31:33 -08:00
AddonContentPolicy.cpp Bug 1213632: Prevent WebExtensions from using versioned JavaScript. r=billm 2015-10-22 23:25:43 -07:00
AddonContentPolicy.h Bug 1213632: Prevent WebExtensions from using versioned JavaScript. r=billm 2015-10-22 23:25:43 -07:00
addonManager.js Bug 1239868 - remove unused PREF_EM_UPDATE_INTERVAL. r=Mossop 2016-01-15 13:11:31 +01:00
AddonManager.jsm Bug 1231003 - clarify in variable names and comments that temporary add-ons can be files or dirs r=mossop 2015-12-07 14:53:11 -05:00
AddonPathService.cpp Bug 1189555 - Support moz-extension URIs in addon path service (r=bholley,Mossop) 2015-08-08 18:15:22 -07:00
AddonPathService.h Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj 2015-03-21 12:28:04 -04:00
amContentHandler.js Bug 1226386: Remove functions names where possible. r=rhelmer 2015-11-19 16:35:41 -08:00
amIAddonManager.idl
amIAddonPathService.idl
amInstallTrigger.js Bug 1226386: Remove functions names where possible. r=rhelmer 2015-11-19 16:35:41 -08:00
amIWebInstaller.idl
amIWebInstallListener.idl Bug 1042699: Block cross-origin add-on install requests. r=dveditz 2015-08-18 17:21:05 -07:00
amWebInstallListener.js Bug 1226386: Remove or fix many uses of Array.forEach. r=rhelmer 2015-11-20 15:31:17 -08:00
ChromeManifestParser.jsm Bug 1226386: Switch to fat arrow functions where it makes sense. r=rhelmer 2015-11-20 10:06:14 -08:00
DeferredSave.jsm Bug 1226386: Remove functions names where possible. r=rhelmer 2015-11-19 16:35:41 -08:00
extensions.manifest Bug 1221270 - Let AddonUpdateService use AddonManagerPrivate to check for updates; r=mfinkle 2015-11-23 23:31:49 -05:00
jar.mn Bug 590127 - Remove toolkit implementation of about:addons r=margaret 2016-01-06 00:49:03 -05:00
LightweightThemeManager.jsm Bug 1226386: Remove use of non-standard __defineGetter__ and __defineSetter__. r=rhelmer 2015-11-20 10:55:13 -08:00
moz.build Bug 590127 - Remove toolkit implementation of about:addons r=margaret 2016-01-06 00:49:03 -05:00
nsBlocklistService.js bug 1228792 - use standard version of catch r=mossop 2015-12-02 18:42:16 -08:00
nsBlocklistServiceContent.js Bug 1226386: Remove functions names where possible. r=rhelmer 2015-11-19 16:35:41 -08:00