if (!mCurrentFilePath) { char filename[256]; PR_snprintf(filename, sizeof(filename), "%i.hst", PR_Now());
char filename[256];
nsHistoryDataSource::Init(const char* uri){    nsresult rv;    if (NS_FAILED(rv = nsComponentManager::CreateInstance(kRDFInMemoryDataSourceCID,                                                          nsnull, kIRDFDataSourceIID,                                                          (void**) &mInner)))        return rv;    if (NS_FAILED(rv = mInner->Init(uri)))        return rv;    rv = nsServiceManager::GetService(kRDFServiceCID,                                               kIRDFServiceIID,                                               (nsISupports**) &gRDFService);    PR_ASSERT(NS_SUCCEEDED(rv));    // register this as a named data source with the RDF service    gRDFService->RegisterDataSource(this);        gRDFService->GetResource(kURINC_Page,    &mResourcePage);    gRDFService->GetResource(kURINC_Date,    &mResourceDate);    gRDFService->GetResource(kURINC_Name,   &mResourceTitle);    gRDFService->GetResource(kURINC_Referer, &mResourceReferer);    gRDFService->GetResource(kURINC_child,   &mResourceChild);    gRDFService->GetResource("NC:HistoryBySite",   &mResourceHistoryBySite);    mLastVisitDateHash = PL_NewHashTable(400, rdf_HashPointer,                                         PL_CompareValues,                                         PL_CompareValues,                                         nsnull, nsnull);     PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &mSessionTime);        mCurrentFilePath = nsnull;    if (NS_FAILED(rv = ReadHistory()))        return rv;    if (!mCurrentFilePath)    {        char filename[256];        PR_snprintf(filename, sizeof(filename), "%i.hst", PR_Now());	nsSpecialSystemDirectory historyFile(nsSpecialSystemDirectory::OS_CurrentProcessDirectory);	historyFile += "res";	historyFile += "rdf";	historyFile += "History";	historyFile.SetLeafName(filename);	nsFilePath	filePath(historyFile);	mCurrentFilePath = PL_strdup((const char*)filePath);    }    return NS_OK;}