return NS_OK; }
nsAutoString oldtitle; rv = GetRowValue(row, kToken_NameColumn, oldtitle); if (NS_FAILED(rv)) return rv;  nsCOMPtr<nsIRDFLiteral> oldname; if (!oldtitle.IsEmpty()) { rv = gRDFService->GetLiteral(oldtitle.GetUnicode(), getter_AddRefs(oldname)); if (NS_FAILED(rv)) return rv;
nsGlobalHistory::SetPageTitle(const char *aURL, const PRUnichar *aTitle){  // XXX This is pretty much copied straight over from Guha's original  // implementation. It needs to be sanitized for safety, etc.  for (PRInt32 i = mPendingWrites.Count() - 1; i >= 0; --i) {    HistoryEntry* wr = (HistoryEntry*) mPendingWrites.ElementAt(i);    if (PL_strcmp(wr->url, aURL) == 0) {      char timeBuffer[256];      PRExplodedTime etime;      PR_ExplodeTime(wr->date, PR_LocalTimeParameters, &etime);      PR_FormatTimeUSEnglish(timeBuffer, 256, "%a %b %d %H:%M:%S %Y", &etime);      nsAutoString  title(aTitle);      char    *cTitle = title.ToNewCString();      char *buffer = PR_smprintf("%s\t%s\t%s\t%lu\t%s\n", wr->url,                                 ((cTitle) ? cTitle:""),                                 ((wr->referrer) ? wr->referrer : ""),                                 1L, timeBuffer);      if (cTitle) {        delete [] cTitle;        cTitle = nsnull;      }      if (buffer) {        nsOutputFileStream out(mCurrentFileSpec, PR_WRONLY | PR_CREATE_FILE | PR_APPEND, 0744);        // XXX because PR_APPEND is broken        out.seek(mCurrentFileSpec.GetFileSize());        out << buffer;        PR_smprintf_free(buffer);      }      mPendingWrites.RemoveElement(wr);      AddPageToGraph(wr->url, aTitle, wr->referrer, 1L, PR_Now());      delete wr;      return NS_OK;    }  }  return NS_OK;}