return NS_OK;
if (! aResult->Exists()) { rv = NS_ERROR_FAILURE; } } } while (0);  #ifdef DEBUG if (NS_FAILED(rv)) { *aResult = nsSpecialSystemDirectory(nsSpecialSystemDirectory::OS_CurrentProcessDirectory); *aResult += "chrome"; *aResult += "bookmarks"; *aResult += "content"; *aResult += "default"; *aResult += "bookmarks.html"; rv = NS_OK; } #endif  return rv;
nsBookmarksService::GetBookmarksFile(nsIFile* *aResult){    nsresult rv;    nsCOMPtr<nsIFile> bookmarksFile;    // 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))    {        nsXPIDLCString prefVal;        rv = prefServ->CopyCharPref("browser.bookmarks.file",                                    getter_Copies(prefVal));              if (NS_SUCCEEDED(rv))        {            rv = NS_NewNativeLocalFile(prefVal, PR_TRUE,                                       (nsILocalFile**)(nsIFile**) getter_AddRefs(bookmarksFile));            if (NS_SUCCEEDED(rv))            {                *aResult = bookmarksFile;                NS_ADDREF(*aResult);                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);    return NS_OK;}