return AddBookmarkToFolder(aURI, destinationFolder, aTitle, aCharset);
if (nsnull != mIEFavoritesRoot) { if (!PL_strcmp(aURL, mIEFavoritesRoot)) { mFoundIEFavoritesRoot = PR_TRUE; } }  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); } } }    rv = aContainer->AppendElement(bookmark); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to add bookmark to container"); if (NS_FAILED(rv)) return rv;  return(NS_OK);
nsBookmarksService::AddBookmark(const char *aURI,                                const PRUnichar *aTitle,                                 PRInt32 aBookmarkType,                                const PRUnichar *aCharset){  nsresult rv;  // figure out where to add the new bookmark	nsCOMPtr<nsIRDFResource>	bookmarkFolder = kNC_NewBookmarkFolder;	switch(aBookmarkType)	{		case	BOOKMARK_SEARCH_TYPE:		case	BOOKMARK_FIND_TYPE:		bookmarkFolder = kNC_NewSearchFolder;		break;	}  nsCOMPtr<nsIRDFResource> destinationFolder;  rv = getFolderViaHint(bookmarkFolder, PR_TRUE, getter_AddRefs(destinationFolder));  if (NS_FAILED(rv)) return rv;  return AddBookmarkToFolder(aURI, destinationFolder, aTitle, aCharset);}