The purpose of nsICategoryManager
is to add entries (typically XPCOM components) to categories. The manager itself merely provides that registration mechanisms, how the categories are used depends entirely on the code that reads out the category entries. For example, there it the profile-after-change
category for components that need to be activated when Firefox starts up.
Most extensions should no longer be using nsICategoryManager
explicitly, adding a category entry can be done with a line in chrome.manifest
:
category profile-after-change MyComponent @foobar/mycomponent;1
This will call nsICategoryManager.addCategoryEntry()
implicitly when the extension is activated.
Edit: Just out of curiosity, I decided to search for nsCategoryCache
in the Firefox source code to see what other categories there are. Here the list:
"content-policy"
fornsIContentPolicy
instances."net-content-sniffers"
and"content-sniffing-services"
fornsIContentSniffer
instances."vacuum-participant"
formozIStorageVacuumParticipant
instances."bookmark-observers"
fornsINavBookmarkObserver
instances."history-observers"
fornsINavHistoryObserver
instances."idle-daily"
for observers managed bynsIIdleService
.
These are only the categories being cached and monitored for changes, the complete list is much longer.