bookmarksFile->GetParent(getter_AddRefs(parentFolder)); if (parentFolder) MaybeRestoreFromBackup(*aResult, parentFolder);
*aResult += "bookmarks.html";
nsBookmarksService::GetBookmarksFile(nsIFile* *aResult){    nsresult rv;    nsCOMPtr<nsIFile> bookmarksFile, parentFolder;    // First we see if the user has set a pref for the location of the     // bookmarks file.    nsCOMPtr<nsIPref> prefServ(do_GetService(kPrefCID, &rv));    if (NS_SUCCEEDED(rv))    {        nsCOMPtr<nsISupportsString> prefVal;        rv = prefServ->GetComplexValue("browser.bookmarks.file",                                       NS_GET_IID(nsISupportsString),                                       getter_AddRefs(prefVal));              if (NS_SUCCEEDED(rv))        {            nsAutoString bookmarkPath;            prefVal->GetData(bookmarkPath);            rv = NS_NewLocalFile(bookmarkPath, PR_TRUE,                                 (nsILocalFile**)(nsIFile**) getter_AddRefs(bookmarksFile));            if (NS_SUCCEEDED(rv))            {                *aResult = bookmarksFile;                NS_ADDREF(*aResult);                bookmarksFile->GetParent(getter_AddRefs(parentFolder));                if (parentFolder)                    MaybeRestoreFromBackup(*aResult, parentFolder);                return NS_OK;            }        }    }    // Otherwise, we look for bookmarks.html in the current profile    // directory using the magic directory service.    rv = NS_GetSpecialDirectory(NS_APP_BOOKMARKS_50_FILE, aResult);    NS_ENSURE_SUCCESS(rv, rv);    NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(parentFolder));    if (parentFolder)        MaybeRestoreFromBackup(*aResult, parentFolder);    return NS_OK;}