Closed Bug 553094 Opened 10 years ago Closed 10 years ago

Support extension metadata in prefs

Categories

(Toolkit :: Add-ons Manager, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9.3a5

People

(Reporter: mossop, Assigned: mossop)

References

Details

(Whiteboard: [rewrite])

Attachments

(1 file, 1 obsolete file)

No description provided.
Dave, can you please give a bit more details on that bug?
Fixed: http://hg.mozilla.org/projects/addonsmgr/rev/178dec446ceb
Status: NEW → ASSIGNED
Flags: in-testsuite+
Flags: in-litmus-
Whiteboard: [rewrite] → [rewrite][fixed-in-addonsmgr][needs-review]
Attached patch patch rev 1 (obsolete) — Splinter Review
Adds the proepr localization handling and tests.
Attachment #435786 - Flags: review?(robert.bugzilla)
Comment on attachment 435786 [details] [diff] [review]
patch rev 1

>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
>@@ -62,6 +62,7 @@ const PREF_EM_CHECK_COMPATIBILITY     = 
> const PREF_EM_CHECK_UPDATE_SECURITY   = "extensions.checkUpdateSecurity";
> const PREF_EM_UPDATE_URL              = "extensions.update.url";
> const PREF_EM_ENABLED_ITEMS           = "extensions.enabledItems";
>+const PREF_EM_EXTENSION_FORMAT        = "extensions.%ID%.";
> const PREF_XPI_ENABLED                = "xpinstall.enabled";
> const PREF_XPI_WHITELIST_REQUIRED     = "xpinstall.whitelist.required";
> 
>@@ -3961,11 +3962,43 @@ function AddonWrapper(addon) {
>   });
> 
>   PROP_LOCALE_SINGLE.forEach(function(prop) {
>-    this.__defineGetter__(prop, function() addon.selectedLocale[prop]);
>+    this.__defineGetter__(prop, function() {
>+      if (addon.active) {
>+        try {
>+          let pref = PREF_EM_EXTENSION_FORMAT.replace(/%ID%/, addon.id) + prop;
seems like this should just append the add-on ID and the '.' here and elsewhere

other than that looks good
Attachment #435786 - Flags: review?(robert.bugzilla) → review+
Attached patch patch rev 2Splinter Review
Comments addressed
Attachment #435786 - Attachment is obsolete: true
Attachment #437336 - Flags: review?(robert.bugzilla)
Comment on attachment 437336 [details] [diff] [review]
patch rev 2

Already reviewed
Attachment #437336 - Flags: review?(robert.bugzilla) → review+
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-review] → [rewrite][fixed-in-addonsmgr][needs-landing]
http://hg.mozilla.org/mozilla-central/rev/13b807ddb531
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [rewrite][fixed-in-addonsmgr][needs-landing] → [rewrite]
Target Milestone: --- → mozilla1.9.3a5
Marking as verified fixed based on check-in and passing automated tests.
Status: RESOLVED → VERIFIED
Depends on: 615443
I had to disable the last part of this test on Mac because it was failing on Tinderboxes:

http://hg.mozilla.org/mozilla-central/rev/e57dc7264ff5

I filed bug 615443 about that.
Depends on: 658044
You need to log in before you can comment on or make changes to this bug.