remove old Mac classic code that depends on functions removed in patch for 280247. r=josh a=bsmedberg

This commit is contained in:
joshmoz%gmail.com 2005-06-24 21:34:16 +00:00
parent d45e228f5a
commit 1f620c5d88

View File

@ -1619,7 +1619,7 @@ nsBookmarksService::nsBookmarksService() :
mDirty(PR_FALSE),
mNeedBackupUpdate(PR_FALSE)
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
,mIEFavoritesAvailable(PR_FALSE)
#endif
{ }
@ -3460,7 +3460,7 @@ nsBookmarksService::ImportSystemBookmarks(nsIRDFResource* aParentFolder)
{
gImportedSystemBookmarks = PR_TRUE;
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
nsCOMPtr<nsIFile> ieFavoritesFile;
nsresult rv = NS_GetSpecialDirectory(NS_MAC_PREFS_DIR, getter_AddRefs(ieFavoritesFile));
NS_ENSURE_SUCCESS(rv, rv);
@ -3478,7 +3478,7 @@ nsBookmarksService::ImportSystemBookmarks(nsIRDFResource* aParentFolder)
return NS_OK;
}
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
void
nsBookmarksService::HandleSystemBookmarks(nsIRDFNode* aNode)
{
@ -3495,7 +3495,7 @@ nsBookmarksService::HandleSystemBookmarks(nsIRDFNode* aNode)
ImportSystemBookmarks(kNC_SystemBookmarksStaticRoot);
}
}
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
// on the Mac, IE favorites are stored in an HTML file.
// Defer importing the contents of this file until necessary.
else if ((aNode == kNC_IEFavoritesRoot) && (mIEFavoritesAvailable == PR_FALSE))
@ -3939,7 +3939,7 @@ nsBookmarksService::HasAssertion(nsIRDFResource* source,
PRBool tv,
PRBool* hasAssertion)
{
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
HandleSystemBookmarks(source);
#endif
@ -3984,7 +3984,7 @@ nsBookmarksService::RemoveObserver(nsIRDFObserver* aObserver)
NS_IMETHODIMP
nsBookmarksService::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *_retval)
{
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
HandleSystemBookmarks(aNode);
#endif
@ -3994,7 +3994,7 @@ nsBookmarksService::HasArcIn(nsIRDFNode *aNode, nsIRDFResource *aArc, PRBool *_r
NS_IMETHODIMP
nsBookmarksService::HasArcOut(nsIRDFResource *aSource, nsIRDFResource *aArc, PRBool *_retval)
{
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
HandleSystemBookmarks(aSource);
#endif
@ -4012,7 +4012,7 @@ NS_IMETHODIMP
nsBookmarksService::ArcLabelsOut(nsIRDFResource* source,
nsISimpleEnumerator** labels)
{
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
HandleSystemBookmarks(source);
#endif
@ -4022,7 +4022,7 @@ nsBookmarksService::ArcLabelsOut(nsIRDFResource* source,
NS_IMETHODIMP
nsBookmarksService::GetAllResources(nsISimpleEnumerator** aResult)
{
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
HandleSystemBookmarks(kNC_SystemBookmarksStaticRoot);
#endif
@ -4473,7 +4473,7 @@ nsBookmarksService::GetBookmarksFile(nsIFile* *aResult)
}
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
nsresult
nsBookmarksService::ReadFavorites()
@ -4482,12 +4482,7 @@ nsBookmarksService::ReadFavorites()
nsresult rv;
#ifdef DEBUG_varga
PRTime now;
#if defined(XP_MAC)
Microseconds((UnsignedWide *)&now);
#else
now = PR_Now();
#endif
PRTime now = PR_Now();
printf("Start reading in IE Favorites.html\n");
#endif
@ -4518,11 +4513,7 @@ nsBookmarksService::ReadFavorites()
}
}
#ifdef DEBUG_varga
PRTime now2;
#if defined(XP_MAC)
Microseconds((UnsignedWide *)&now2);
#else
now = PR_Now();
PRTime now2 = PR_Now();
#endif
PRUint64 loadTime64;
LL_SUB(loadTime64, now2, now);
@ -4541,22 +4532,12 @@ nsBookmarksService::ReadBookmarks(PRBool *didLoadBookmarks)
if (!gLoadedBookmarks)
{
#if 0
PRTime now;
#if defined(XP_MAC)
Microseconds((UnsignedWide *)&now);
#else
now = PR_Now();
#endif
PRTime now = PR_Now();
printf("Time reading in bookmarks.html: ");
#endif
LoadBookmarks();
#if 0
PRTime now2;
#if defined(XP_MAC)
Microseconds((UnsignedWide *)&now2);
#else
now2 = PR_Now();
#endif
PRTime now2 = PR_Now();
PRUint64 loadTime64;
LL_SUB(loadTime64, now2, now);
PRUint32 loadTime32;
@ -4660,12 +4641,7 @@ nsBookmarksService::LoadBookmarks()
PRBool foundIERoot = PR_FALSE;
#ifdef DEBUG_varga
PRTime now;
#if defined(XP_MAC)
Microseconds((UnsignedWide *)&now);
#else
now = PR_Now();
#endif
PRTime now = PR_Now();
printf("Start reading in bookmarks.html\n");
#endif
@ -4720,7 +4696,7 @@ nsBookmarksService::LoadBookmarks()
parser.Init(bookmarksFile, mInner);
if (useDynamicSystemBookmarks)
{
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
parser.SetIEFavoritesRoot(nsCString(kURINC_IEFavoritesRoot));
#elif defined(XP_BEOS)
parser.SetIEFavoritesRoot(bookmarksURICString);
@ -4773,7 +4749,7 @@ nsBookmarksService::LoadBookmarks()
// When the user opens this folder for the first time, system bookmarks are
// imported into this folder. A pref is used to keep track of whether or
// not to perform this operation.
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
PRBool addedStaticRoot = PR_FALSE;
if (mBookmarksPrefs)
mBookmarksPrefs->GetBoolPref("added_static_root",
@ -4817,7 +4793,7 @@ nsBookmarksService::LoadBookmarks()
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIRDFResource> systemFolderResource;
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
rv = gRDF->GetResource(NS_LITERAL_CSTRING(kURINC_IEFavoritesRoot),
getter_AddRefs(systemFolderResource));
#endif
@ -4835,7 +4811,7 @@ nsBookmarksService::LoadBookmarks()
// by setting the pref.
if (useDynamicSystemBookmarks)
{
#if defined(XP_MAC) || defined(XP_MACOSX)
#if defined(XP_MACOSX)
// if the IE Favorites root isn't somewhere in bookmarks.html, add it
if (!foundIERoot)
{
@ -4885,12 +4861,7 @@ nsBookmarksService::LoadBookmarks()
}
#ifdef DEBUG_varga
PRTime now2;
#if defined(XP_MAC)
Microseconds((UnsignedWide *)&now2);
#else
now2 = PR_Now();
#endif
PRTime now2 = PR_Now();
PRUint64 loadTime64;
LL_SUB(loadTime64, now2, now);
PRUint32 loadTime32;