do_GetService("component: NS_ASSERTION(chromeReg, "chrome check couldn't get the chrome registry");
do_GetService("component: if (!chromeReg) { NS_WARNING("chrome check couldn't get the chrome registry"); return NS_ERROR_FAILURE; }   nsIDirectoryServiceProvider *appFileLocProvider; appFileLocProvider = new nsAppFileLocationProvider; if (!appFileLocProvider) { NS_WARNING("failed to create directory service provider\n"); return NS_ERROR_FAILURE; }  NS_ADDREF(appFileLocProvider); nsresult rv; NS_WITH_SERVICE(nsIDirectoryService, directoryService, NS_DIRECTORY_SERVICE_PROGID, &rv); if (NS_FAILED(rv)) { NS_WARNING("failed to get directory service"); return rv; } rv = directoryService->RegisterProvider(appFileLocProvider); if (NS_FAILED(rv)) { NS_WARNING("failed to register provider"); return rv; } NS_RELEASE(appFileLocProvider);
int main(int argc, char **argv){  NS_InitXPCOM(nsnull, nsnull);  nsCOMPtr <nsIChromeRegistry> chromeReg =         do_GetService("component://netscape/chrome/chrome-registry");  NS_ASSERTION(chromeReg, "chrome check couldn't get the chrome registry");  chromeReg->CheckForNewChrome();  // release the chrome registry before we shutdown XPCOM  chromeReg = 0;  NS_ShutdownXPCOM(nsnull);}