strm << "<TITLE>Bookmarks</TITLE>\n"; strm << "<H1>Bookmarks</H1>\n\n";  rv = WriteBookmarksContainer(ds, strm, root, 0); mDirty = PR_FALSE; } return(rv);
strm << "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">\n";  strm << "<TITLE>Bookmarks</TITLE>\n"; strm << "<H1>Bookmarks</H1>\n\n";  rv = WriteBookmarksContainer(aDataSource, strm, aRoot, 0, parentArray); mDirty = PR_FALSE; }    succeeded = NS_FAILED(rv) ? PR_FALSE : NS_SUCCEEDED(strm.lastWriteStatus()); }     if (succeeded) { char* bookmarksFileName = bookmarksFile.GetLeafName(); char* tempBookmarksFileName = tempFile.GetLeafName();  if (nsCRT::strcmp(bookmarksFileName, tempBookmarksFileName)) { bookmarksFile.Delete(PR_FALSE); tempFile.Rename(bookmarksFileName); }  nsCRT::free(tempBookmarksFileName); nsCRT::free(bookmarksFileName); } else  tempFile.Delete(PR_FALSE);  return rv;
nsBookmarksService::WriteBookmarks(nsIRDFDataSource *ds, nsIRDFResource *root){	nsresult rv;	nsFileSpec bookmarksFile;	rv = GetBookmarksFile(&bookmarksFile);	// Oh well, couldn't get the bookmarks file. Guess there	// aren't any bookmarks for us to write out.	if (NS_FAILED(rv))	    return NS_OK;	rv = NS_ERROR_FAILURE;	nsOutputFileStream	strm(bookmarksFile);	if (strm.is_open())	{		strm << "<!DOCTYPE NETSCAPE-Bookmark-file-1>\n";		strm << "<!-- This is an automatically generated file.\n";		strm << "It will be read and overwritten.\n";		strm << "Do Not Edit! -->\n";		// Note: we write out bookmarks in UTF-8		strm << "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">\n";		strm << "<TITLE>Bookmarks</TITLE>\n";		strm << "<H1>Bookmarks</H1>\n\n";				rv = WriteBookmarksContainer(ds, strm, root, 0);		mDirty = PR_FALSE;	}	return(rv);}