NS_WITH_SERVICE(nsIPlatformCharset, platformCharset, kPlatformCharsetCID, &rv); if (NS_SUCCEEDED(rv) && (platformCharset)) { nsAutoString	defaultCharset; if (NS_SUCCEEDED(rv = platformCharset->GetCharset(kPlatformCharsetSel_4xBookmarkFile, defaultCharset))) {   NS_WITH_SERVICE(nsICharsetConverterManager, charsetConv, kCharsetConverterManagerCID, &rv); if (NS_SUCCEEDED(rv) && (charsetConv)) { rv = charsetConv->GetUnicodeDecoder(&defaultCharset, getter_AddRefs(mUnicodeDecoder)); } } }
FileSystemDataSource::FileSystemDataSource(void){	NS_INIT_REFCNT();	if (gRefCnt++ == 0)	{		nsresult rv = nsServiceManager::GetService(kRDFServiceCID,					   nsIRDFService::GetIID(),					   (nsISupports**) &gRDFService);		PR_ASSERT(NS_SUCCEEDED(rv));#ifdef	XP_WIN		nsSpecialSystemDirectory	ieFavoritesFolder(nsSpecialSystemDirectory::Win_Favorites);		nsFileURL			ieFavoritesURLSpec(ieFavoritesFolder);		const char			*ieFavoritesURI = ieFavoritesURLSpec.GetAsString();		if (ieFavoritesURI)		{			ieFavoritesDir = nsCRT::strdup(ieFavoritesURI);		}		gRDFService->GetResource(NC_NAMESPACE_URI "IEFavorite",       &kNC_IEFavoriteObject);#endif		gRDFService->GetResource(kURINC_FileSystemRoot,               &kNC_FileSystemRoot);		gRDFService->GetResource(NC_NAMESPACE_URI "child",            &kNC_Child);		gRDFService->GetResource(NC_NAMESPACE_URI "Name",             &kNC_Name);		gRDFService->GetResource(NC_NAMESPACE_URI "URL",              &kNC_URL);		gRDFService->GetResource(NC_NAMESPACE_URI "FileSystemObject", &kNC_FileSystemObject);		gRDFService->GetResource(NC_NAMESPACE_URI "pulse",            &kNC_pulse);		gRDFService->GetResource(RDF_NAMESPACE_URI "instanceOf",      &kRDF_InstanceOf);		gRDFService->GetResource(RDF_NAMESPACE_URI "type",            &kRDF_type);		gFileSystemDataSource = this;	}}