Re: [crx] chrome.management.onInstalled and ExtensionInfo.enabled property not set correctly

118 views
Skip to first unread message

Joe Marini

unread,
Dec 5, 2012, 9:05:34 PM12/5/12
to Raphael Cohen, Chromium-extensions
Can you file an issue on this at crbug.com?



On Mon, Dec 3, 2012 at 2:49 AM, Raphael Cohen <raphae...@gmail.com> wrote:
Hello everyone.
I have an issue with the ExtensonInfo.enabled property when hooking up to the chrome.management.onInstalled event.

I have an extension with the following code to listen for installed extensions :

chrome.management.onInstalled.addListener(function (e0) {
console.log("installed", e0.name, "enabled=" + e0.enabled);
});
chrome.management.onEnabled.addListener(function (e2) {
console.log("enabled", e2.name, "enabled=" + e2.enabled);
});

The onEnabled event always gets triggered after the onInstalled event, which makes sense. But when I analyse the enabled property on the onInstalled event, this property is always set to true even before onEnabled is fired. I think this is not right. This property should not be set to true until onEnabled is fired.
This is annoying to me because I have many extensions and all of them are dependent on one specific extension to run, and the install order of all extensions is random, so I have one extension which checks, on first run, which extensiosn are already installed, which are enabled, and listens when extensions are Installed and Enabled.

Thanks for any help on this.

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/T72E1WXWlksJ.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.



--
Joe Marini
Developer Advocate / Chrome


Raphael Cohen

unread,
Dec 6, 2012, 4:03:01 AM12/6/12
to chromium-...@chromium.org, Raphael Cohen
Thanks for your answer, though I don't really know for now if it's a real issue or if it's the normal behavior. We've had a discussion on the subject here :

Le jeudi 6 décembre 2012 03:05:34 UTC+1, Joe Marini a écrit :
Can you file an issue on this at crbug.com?

On Mon, Dec 3, 2012 at 2:49 AM, Raphael Cohen <raphae...@gmail.com> wrote:
Hello everyone.
I have an issue with the ExtensonInfo.enabled property when hooking up to the chrome.management.onInstalled event.

I have an extension with the following code to listen for installed extensions :

chrome.management.onInstalled.addListener(function (e0) {
console.log("installed", e0.name, "enabled=" + e0.enabled);
});
chrome.management.onEnabled.addListener(function (e2) {
console.log("enabled", e2.name, "enabled=" + e2.enabled);
});

The onEnabled event always gets triggered after the onInstalled event, which makes sense. But when I analyse the enabled property on the onInstalled event, this property is always set to true even before onEnabled is fired. I think this is not right. This property should not be set to true until onEnabled is fired.
This is annoying to me because I have many extensions and all of them are dependent on one specific extension to run, and the install order of all extensions is random, so I have one extension which checks, on first run, which extensiosn are already installed, which are enabled, and listens when extensions are Installed and Enabled.

Thanks for any help on this.

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/T72E1WXWlksJ.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extensions+unsub...@chromium.org.
Reply all
Reply to author
Forward
0 new messages