Bug 400499 - remove XP_MAC deadcode in profile/, r+sr=neil, a=dsicore
authorphilringnalda@gmail.com
Mon, 12 Nov 2007 19:20:39 -0800
changeset 7892 21dbc6ba37b0a6b96e4e646acfaf7dbaed37265c
parent 7891 bb5e3f39c242a49f90cbe81842f6666eb8cbf6c8
child 7893 52b032f34a840247b4ad6ac5fca3a3482276517a
push idunknown
push userunknown
push dateunknown
reviewersdsicore
bugs400499
milestone1.9b2pre
Bug 400499 - remove XP_MAC deadcode in profile/, r+sr=neil, a=dsicore
profile/dirserviceprovider/src/nsProfileLock.cpp
profile/pref-migrator/src/nsPrefMigration.cpp
profile/pref-migrator/src/nsPrefMigration.h
--- a/profile/dirserviceprovider/src/nsProfileLock.cpp
+++ b/profile/dirserviceprovider/src/nsProfileLock.cpp
@@ -39,17 +39,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsProfileStringTypes.h"
 #include "nsProfileLock.h"
 #include "nsCOMPtr.h"
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
 #include <Processes.h>
 #include <CFBundle.h>
 #endif
 
 #ifdef XP_UNIX
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
--- a/profile/pref-migrator/src/nsPrefMigration.cpp
+++ b/profile/pref-migrator/src/nsPrefMigration.cpp
@@ -71,21 +71,16 @@
 #include "nsIBaseWindow.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeItem.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsIWindowWatcher.h"
 #include "nsEmbedCID.h"
 
-#if defined(XP_MAC) && !defined(DEBUG)
-//lower silly optimization level which takes an age for this file.
-#pragma optimization_level 1
-#endif
-
 #ifdef DEBUG_seth
 #define DEBUG_UTF8_CONVERSION 1
 #endif 
 
 #include "nsICharsetConverterManager.h"
 #include "nsIPlatformCharset.h"
 
 #define CHROME_STYLE nsIWebBrowserChrome::CHROME_ALL | nsIWebBrowserChrome::CHROME_CENTER_SCREEN
@@ -108,17 +103,17 @@
 #define COOKIES_FILE_NAME_IN_4x "cookies"
 #define BOOKMARKS_FILE_NAME_IN_4x "bookmarks.html"
 #define NEWSRC_PREFIX_IN_4x ".newsrc-"
 #define SNEWSRC_PREFIX_IN_4x ".snewsrc-"
 #define POPSTATE_FILE_IN_4x "popstate"
 #define PSM_CERT7_DB "cert7.db"
 #define PSM_KEY3_DB "key3.db"
 #define PSM_SECMODULE_DB "secmodule.db"
-#elif defined(XP_MAC) || defined(XP_MACOSX)
+#elif defined(XP_MACOSX)
 #define MAC_RULES_FILE_ENDING_STRING_IN_4X " Rules"
 #define IMAP_MAIL_FILTER_FILE_NAME_IN_4x "<hostname> Rules"
 #define POP_MAIL_FILTER_FILE_NAME_IN_4x "Filter Rules"
 #define MAIL_SUMMARY_SUFFIX_IN_4x ".snm"
 #define NEWS_SUMMARY_SUFFIX_IN_4x ".snm"
 #define COOKIES_FILE_NAME_IN_4x "MagicCookie"
 #define BOOKMARKS_FILE_NAME_IN_4x "Bookmarks.html"
 #define POPSTATE_FILE_IN_4x "Pop State"
@@ -228,20 +223,20 @@ typedef struct
  * generated in 4.x cannot be migrated to 5.0 as is -- instead the 
  * expiration time must first be decreased by
  * the number of seconds between 1-1-1900 and 1-1-1970
  * 
  *  70 years * 365 days/year * 86,400 secs/day      = 2,207,520,000 seconds
  * + 17 leap years * 86,400 additional sec/leapyear =     1,468,800 seconds
  *                                                  = 2,208,988,800 seconds
  */
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
 #define NEED_TO_FIX_4X_COOKIES 1
 #define SECONDS_BETWEEN_1900_AND_1970 2208988800UL
-#endif /* XP_MAC */
+#endif /* XP_MACOSX */
 
 /*-----------------------------------------------------------------
  * Globals
  *-----------------------------------------------------------------*/
 nsPrefMigration* nsPrefMigration::mInstance = nsnull;
 
 nsPrefMigration *
 nsPrefMigration::GetInstance()
@@ -1115,29 +1110,29 @@ nsPrefMigration::ProcessPrefsCallback(co
     needToRenameFilterFiles = PR_FALSE;
   }
   
   // just copy what we need
   rv = DoTheCopy(oldProfilePath, newProfilePath, COOKIES_FILE_NAME_IN_4x);
   if (NS_FAILED(rv)) return rv;
   rv = DoTheCopy(oldProfilePath, newProfilePath, BOOKMARKS_FILE_NAME_IN_4x);
   if (NS_FAILED(rv)) return rv;
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
   rv = DoTheCopy(oldProfilePath, newProfilePath, SECURITY_PATH, PR_TRUE);
   if (NS_FAILED(rv)) return rv;
 #else
   rv = DoTheCopy(oldProfilePath, newProfilePath, PSM_CERT7_DB);
   if (NS_FAILED(rv)) return rv;
   rv = DoTheCopy(oldProfilePath, newProfilePath, PSM_KEY3_DB);
   if (NS_FAILED(rv)) return rv;
   rv = DoTheCopy(oldProfilePath, newProfilePath, PSM_SECMODULE_DB);
   if (NS_FAILED(rv)) return rv;
-#endif /* XP_MAC */
+#endif /* XP_MACOSX */
 
-#if defined(XP_MAX) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
   // Copy the Mac filter rule files which sits at the top level dir of a 4.x profile.
   if(serverType == IMAP_4X_MAIL_TYPE) {
     rv = CopyFilesByPattern(oldProfilePath, newProfilePath, MAC_RULES_FILE_ENDING_STRING_IN_4X);
     NS_ENSURE_SUCCESS(rv,rv);
   }
 #endif
 
   rv = DoTheCopy(oldNewsPath, newNewsPath, PR_TRUE);
--- a/profile/pref-migrator/src/nsPrefMigration.h
+++ b/profile/pref-migrator/src/nsPrefMigration.h
@@ -57,17 +57,17 @@
 #define MIGRATION_RETRY      1
 #define MIGRATION_CANCEL     2
 #define MIGRATION_CREATE_NEW 3
 
 #define MAX_DRIVES 4
 
 //Interfaces Needed
 
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#if defined(XP_MACOSX)
 #define IMAP_MAIL_FILTER_FILE_NAME_FORMAT_IN_4x "%s Rules" 
 #endif
 
 #if defined(XP_UNIX) && !defined(XP_MACOSX)
 #define NEED_TO_COPY_AND_RENAME_NEWSRC_FILES
 #endif
 
 class nsPrefConverter: public nsIPrefConverter