nsresult rv; nsCOMPtr<nsICategoryManager> categoryManager(do_GetService("@mozilla.org/categorymanager;1", &rv)); if (NS_SUCCEEDED(rv)) { rv = categoryManager->AddCategoryEntry("parser-service-category", "Meta Charset Service", NS_META_CHARSET_CONTRACTID, PR_TRUE, PR_TRUE, nsnull); } return rv;
return AddCategoryEntry("parser-service-category", "Meta Charset Service", NS_META_CHARSET_CONTRACTID);
static NS_METHOD nsMetaCharsetObserverRegistrationProc(nsIComponentManager *aCompMgr,                                          nsIFile *aPath,                                          const char *registryLocation,                                          const char *componentType,                                          const nsModuleComponentInfo *info){  nsresult rv;  nsCOMPtr<nsICategoryManager>     categoryManager(do_GetService("@mozilla.org/categorymanager;1", &rv));  if (NS_SUCCEEDED(rv)) {    rv = categoryManager->AddCategoryEntry("parser-service-category",                                            "Meta Charset Service",                                            NS_META_CHARSET_CONTRACTID,                                            PR_TRUE, PR_TRUE,                                            nsnull);  }  return rv;}