if (nsnull != mIEFavoritesRoot) { if (!PL_strcmp(aURL, mIEFavoritesRoot)) { mFoundIEFavoritesRoot = PR_TRUE; } }
nsCOMPtr<nsIRDFResource> destinationFolder; rv = getFolderViaHint(bookmarkFolder, PR_TRUE, getter_AddRefs(destinationFolder)); if (NS_FAILED(rv)) return rv;
BookmarkParser::AddBookmark(nsCOMPtr<nsIRDFContainer>&  aContainer,                            const char*      aURL,                            const PRUnichar* aOptionalTitle,                            PRInt32          aAddDate,                            PRInt32          aLastVisitDate,                            PRInt32          aLastModifiedDate,                            const char*      aShortcutURL,                            nsIRDFResource*  aNodeType){	nsresult rv;	nsCOMPtr<nsIRDFResource> bookmark;	if (NS_FAILED(rv = gRDF->GetResource(aURL, getter_AddRefs(bookmark) )))	{		NS_ERROR("unable to get bookmark resource");		return rv;	}	if (nsnull != mIEFavoritesRoot)	{		if (!PL_strcmp(aURL, mIEFavoritesRoot))		{			mFoundIEFavoritesRoot = PR_TRUE;		}	}    rv = aContainer->AppendElement(bookmark);    NS_ASSERTION(NS_SUCCEEDED(rv), "unable to add bookmark to container");    if (NS_FAILED(rv)) return rv;	rv = mDataSource->Assert(bookmark, kRDF_type, aNodeType, PR_TRUE);    if (rv != NS_RDF_ASSERTION_ACCEPTED)    {		NS_ERROR("unable to add bookmark to data source");		return rv;	}	if ((nsnull != aOptionalTitle) && (*aOptionalTitle != PRUnichar('\0')))	{		nsCOMPtr<nsIRDFLiteral> literal;		if (NS_FAILED(rv = gRDF->GetLiteral(aOptionalTitle, getter_AddRefs(literal))))		{			NS_ERROR("unable to create literal for bookmark name");			return rv;		}		rv = mDataSource->Assert(bookmark, kNC_Name, literal, PR_TRUE);        if (rv != NS_RDF_ASSERTION_ACCEPTED)		{			NS_ERROR("unable to set bookmark name");			return rv;		}	}	AssertTime(bookmark, kNC_BookmarkAddDate, aAddDate);	AssertTime(bookmark, kWEB_LastVisitDate, aLastVisitDate);	AssertTime(bookmark, kWEB_LastModifiedDate, aLastModifiedDate);	if ((nsnull != aShortcutURL) && (*aShortcutURL != '\0'))	{		nsCOMPtr<nsIRDFLiteral> shortcutLiteral;		if (NS_FAILED(rv = gRDF->GetLiteral(nsAutoString(aShortcutURL).GetUnicode(),			getter_AddRefs(shortcutLiteral))))		{			NS_ERROR("unable to get literal for bookmark shortcut URL");			return(rv);		}		if (rv != NS_RDF_NO_VALUE)		{			rv = mDataSource->Assert(bookmark,                                     kNC_ShortcutURL,                                     shortcutLiteral,                                     PR_TRUE);            if (rv != NS_RDF_ASSERTION_ACCEPTED)			{				NS_ERROR("unable to set bookmark shortcut URL");				return(rv);			}		}	}	return(NS_OK);}