Closed
Bug 555486
Opened 16 years ago
Closed 16 years ago
Add information to the API about where add-ons are installed
Categories
(Toolkit :: Add-ons Manager, defect, P1)
Toolkit
Add-ons Manager
Tracking
()
VERIFIED
FIXED
mozilla1.9.3a5
People
(Reporter: mossop, Assigned: mossop)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [rewrite])
Attachments
(1 file, 1 obsolete file)
|
40.78 KB,
patch
|
robert.strong.bugs
:
review+
|
Details | Diff | Splinter Review |
Going to group add-ons into the following general install areas:
Application
System
User
Profile
| Assignee | ||
Comment 1•16 years ago
|
||
Status: NEW → ASSIGNED
Flags: in-testsuite+
Flags: in-litmus-
Whiteboard: [rewrite] → [rewrite][fixed-in-addonsmgr][needs-review]
| Assignee | ||
Comment 2•16 years ago
|
||
Adds an Addon.scope property that holds the area an add-on is installed in. Also allows disabling certain scopes and disables the application scope for xpcshell tests which should stop issues with SeaMonkey etc.
Updated•16 years ago
|
Attachment #435778 -
Flags: review?(robert.bugzilla)
Comment 3•16 years ago
|
||
Comment on attachment 435778 [details] [diff] [review]
patch rev 1
It looks like you aren't turning off the registry install location by default for xpcshell which isn't really a problem as I see it but since we discussed it I am bringing it up.
Is it possible to reload the extensions for mochitests using this method?
>diff --git a/toolkit/mozapps/extensions/AddonManager.jsm b/toolkit/mozapps/extensions/AddonManager.jsm
>--- a/toolkit/mozapps/extensions/AddonManager.jsm
>+++ b/toolkit/mozapps/extensions/AddonManager.jsm
>@@ -825,6 +825,16 @@ var AddonManager = {
> // Indicates that the Addon can be upgraded.
> PERM_CAN_UPGRADE: 8,
>
>+ // General descriptions of where items are installed.
>+ // Installed in this profile.
>+ SCOPE_PROFILE: 1,
>+ // Installed and owned by the application.
>+ SCOPE_APPLICATION: 2,
>+ // Installed for all of this user's profiles.
>+ SCOPE_USER: 4,
>+ // Installed for all users of the computer.
>+ SCOPE_SYSTEM: 8,
Might be handy to have a SCOPE_ALL here
> getInstallForURL: function AM_getInstallForURL(url, callback, mimetype, hash,
> name, iconURL, version,
> loadGroup) {
>diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm
>--- a/toolkit/mozapps/extensions/XPIProvider.jsm
>+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
>...
>@@ -811,16 +812,44 @@ var XPIProvider = {
>
> let hasRegistry = ("nsIWindowsRegKey" in Ci);
>
>+ let enabledScopes = Prefs.getIntPref(PREF_EM_ENABLED_SCOPES, 15);
and use SCOPE_ALL here
>...
>@@ -4397,6 +4437,20 @@ DirectoryInstallLocation.prototype = {
> },
>
> /**
>+ * Gets the scope of this install location.
>+ */
>+ get scope() {
>+ return this._scope;
>+ },
>+
>+ /**
>+ * Gets the scope of this install location.
>+ */
>+ get scope() {
>+ return this._scope;
>+ },
Two get scope()'s
I'd prefer reviewing a new patch with the fixes above and against the changes from bug 555083 so r-. The tests look good so it shouldn't take long to finish the review for this.
Attachment #435778 -
Flags: review?(robert.bugzilla) → review-
Updated•16 years ago
|
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-review] → [rewrite][fixed-in-addonsmgr][needs-patch]
| Assignee | ||
Comment 4•16 years ago
|
||
Attachment #435778 -
Attachment is obsolete: true
Attachment #437326 -
Flags: review?(robert.bugzilla)
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-patch] → [rewrite][fixed-in-addonsmgr][needs-review]
Comment 5•16 years ago
|
||
Comment on attachment 437326 [details] [diff] [review]
patch rev 2
Looks good
Attachment #437326 -
Flags: review?(robert.bugzilla) → review+
Updated•16 years ago
|
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-review] → [rewrite][fixed-in-addonsmgr][needs-landing]
| Assignee | ||
Comment 6•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-landing] → [rewrite]
Target Milestone: --- → mozilla1.9.3a5
Verified fixed by check-in and passing automated tests.
Status: RESOLVED → VERIFIED
Blocks: 381525
| Assignee | ||
Comment 8•15 years ago
|
||
Do we document preferences? If so we should document extensions.enabledScopes, particularly the fact that you can't turn off the profile scope.
Keywords: dev-doc-needed
Comment 9•15 years ago
|
||
Added a note about the extensions.enabledScopes preference here:
https://developer.mozilla.org/en/Addons/Add-on_Manager/AddonManager#Installation_scopes
Keywords: dev-doc-needed → dev-doc-complete
(In reply to Eric Shepherd [:sheppy] from comment #9)
> https://developer.mozilla.org/en/Addons/Add-on_Manager/
> AddonManager#Installation_scopes
Those scopes are not correct. The list of current values can be found here:
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1258
Keywords: dev-doc-complete → dev-doc-needed
Comment 11•14 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #10)
> (In reply to Eric Shepherd [:sheppy] from comment #9)
> > https://developer.mozilla.org/en/Addons/Add-on_Manager/
> > AddonManager#Installation_scopes
>
> Those scopes are not correct. The list of current values can be found here:
> http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/
> AddonManager.jsm#1258
They look exactly the same to me, they're just sorted into alphabetical order. I added the values of the constants to the table though.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•