nsresult nsGnomeVFSProtocolHandler::Init() { #ifdef PR_LOGGING sGnomeVFSLog = PR_NewLogModule("gnomevfs"); #endif if (!gnome_vfs_initialized()) { if (!gnome_vfs_init()) { NS_WARNING("gnome_vfs_init failed"); return NS_ERROR_UNEXPECTED; } } nsCOMPtr<nsIPrefBranch2> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefs) { InitSupportedProtocolsPref(prefs); prefs->AddObserver(MOZ_GNOMEVFS_SUPPORTED_PROTOCOLS, this, PR_FALSE); } return NS_OK; }
NS_IMETHODIMP nsGIOProtocolHandler::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) { if (strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID) == 0) { nsCOMPtr<nsIPrefBranch> prefs = do_QueryInterface(aSubject); InitSupportedProtocolsPref(prefs); } return NS_OK; }
nsresult nsGIOProtocolHandler::Init() { nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefs) { InitSupportedProtocolsPref(prefs); prefs->AddObserver(MOZ_GIO_SUPPORTED_PROTOCOLS, this, false); } return NS_OK; }
nsresult nsGIOProtocolHandler::Init() { #ifdef PR_LOGGING sGIOLog = PR_NewLogModule("gio"); #endif nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); if (prefs) { InitSupportedProtocolsPref(prefs); prefs->AddObserver(MOZ_GIO_SUPPORTED_PROTOCOLS, this, false); } return NS_OK; }