Closed Bug 702806 Opened 13 years ago Closed 6 years ago

Create AddonManager.getAllStartupChanges()


(Toolkit :: Add-ons Manager, defect)

Not set





(Reporter: gps, Unassigned)




(1 file)

I'm requesting a new function on AddonManager, getAllStartupChanges().

This will simply return an object containing IDs of everything that changed during startup. e.g.

  {changed: ["id1"], installed: ["id2"}

I want this API for add-on sync and think it is better than calling getStartupChanges() for each change type because: a) less function calls b) guaranteed to iterate over every change type.

If the attachment is f+, I'll code some unit tests and submit a new patch for review. If you don't like the idea, it will make Sync code more verbose and prone to breaking, but I'll live with it.
Attachment #574710 - Flags: feedback?(bmcbride)
Comment on attachment 574710 [details] [diff] [review]
Add AddonManager.getAllStartupChanges()

Review of attachment 574710 [details] [diff] [review]:

Yea, that works. Pity the design of getStartupChanges() doesn't allow for just passing in STARTUP_CHANGE_ALL or null (like the rest of the APIs do), but oh well.
Attachment #574710 - Flags: feedback?(bmcbride) → feedback+
Well, it would be trivial to add STARTUP_CHANGE_ALL to getStartupChanges(). The return type would have a different format (object instead of list), so maybe a different function is warranted. Let me know.
(In reply to Gregory Szorc [:gps] from comment #2)
> The return type would have a different format (object instead of list), so
> maybe a different function is warranted.

Yea, that's what I meant - it would require changing the return type, which I don't think is worth it since that would make the normal use of that function more cumbersome. So a new function seems like the way to go.
I may not need this API depending on what happens in bug 702819. Ideally this API should be considered separately. But since I'm the only requester, I'm going to hold off and see what happens in bug 702819 before going any further.
Depends on: 702819
I no longer need this for add-on sync. I'll leave it up to the Add-on Manager folks to determine what to do with it.
No longer blocks: 534956
Per policy at If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.