summaryrefslogtreecommitdiff
path: root/toolkit/profile
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/profile')
-rw-r--r--toolkit/profile/content/createProfileWizard.js4
-rw-r--r--toolkit/profile/content/createProfileWizard.xul4
-rw-r--r--toolkit/profile/content/profileSelection.js2
-rw-r--r--toolkit/profile/jar.mn4
-rw-r--r--toolkit/profile/nsProfileLock.cpp72
-rw-r--r--toolkit/profile/nsToolkitProfileService.cpp33
6 files changed, 5 insertions, 114 deletions
diff --git a/toolkit/profile/content/createProfileWizard.js b/toolkit/profile/content/createProfileWizard.js
index aa87eacd71..f378f36769 100644
--- a/toolkit/profile/content/createProfileWizard.js
+++ b/toolkit/profile/content/createProfileWizard.js
@@ -116,11 +116,7 @@ function checkCurrentInput(currentInput)
if (!errorMessage) {
finishText.className = "";
-#ifdef XP_MACOSX
- finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishTextMac");
-#else
finishText.firstChild.data = gProfileManagerBundle.getString("profileFinishText");
-#endif
canAdvance = true;
}
else {
diff --git a/toolkit/profile/content/createProfileWizard.xul b/toolkit/profile/content/createProfileWizard.xul
index eab1a93414..c7e0702a62 100644
--- a/toolkit/profile/content/createProfileWizard.xul
+++ b/toolkit/profile/content/createProfileWizard.xul
@@ -31,15 +31,11 @@
<description>&profileCreationExplanation_2.text;</description>
<description>&profileCreationExplanation_3.text;</description>
<spacer flex="1"/>
-#ifdef XP_MACOSX
- <description>&profileCreationExplanation_4Mac.text;</description>
-#else
#ifdef XP_UNIX
<description>&profileCreationExplanation_4Gnome.text;</description>
#else
<description>&profileCreationExplanation_4.text;</description>
#endif
-#endif
</wizardpage>
<wizardpage id="createProfile" onpageshow="initSecondWizardPage();">
diff --git a/toolkit/profile/content/profileSelection.js b/toolkit/profile/content/profileSelection.js
index 05ef6f5edb..9fb77dfcd0 100644
--- a/toolkit/profile/content/profileSelection.js
+++ b/toolkit/profile/content/profileSelection.js
@@ -134,9 +134,7 @@ function onProfilesKey(aEvent)
switch ( aEvent.keyCode )
{
case KeyEvent.DOM_VK_BACK_SPACE:
-#ifndef XP_MACOSX
break;
-#endif
case KeyEvent.DOM_VK_DELETE:
ConfirmDelete();
break;
diff --git a/toolkit/profile/jar.mn b/toolkit/profile/jar.mn
index 1c4afac4ca..9b7c22266e 100644
--- a/toolkit/profile/jar.mn
+++ b/toolkit/profile/jar.mn
@@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
toolkit.jar:
-* content/mozapps/profile/createProfileWizard.js (content/createProfileWizard.js)
+ content/mozapps/profile/createProfileWizard.js (content/createProfileWizard.js)
* content/mozapps/profile/createProfileWizard.xul (content/createProfileWizard.xul)
-* content/mozapps/profile/profileSelection.js (content/profileSelection.js)
+ content/mozapps/profile/profileSelection.js (content/profileSelection.js)
content/mozapps/profile/profileSelection.xul (content/profileSelection.xul)
diff --git a/toolkit/profile/nsProfileLock.cpp b/toolkit/profile/nsProfileLock.cpp
index d75b6082d3..654fbcd465 100644
--- a/toolkit/profile/nsProfileLock.cpp
+++ b/toolkit/profile/nsProfileLock.cpp
@@ -13,11 +13,6 @@
#include "nsAutoPtr.h"
#endif
-#if defined(XP_MACOSX)
-#include <Carbon/Carbon.h>
-#include <CoreFoundation/CoreFoundation.h>
-#endif
-
#ifdef XP_UNIX
#include <unistd.h>
#include <fcntl.h>
@@ -426,10 +421,7 @@ nsresult nsProfileLock::GetReplacedLockTime(PRTime *aResult) {
nsresult nsProfileLock::Lock(nsIFile* aProfileDir,
nsIProfileUnlocker* *aUnlocker)
{
-#if defined (XP_MACOSX)
- NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, ".parentlock");
- NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "parent.lock");
-#elif defined (XP_UNIX)
+#if defined (XP_UNIX)
NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "lock");
NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, ".parentlock");
#else
@@ -458,67 +450,7 @@ nsresult nsProfileLock::Lock(nsIFile* aProfileDir,
if (NS_FAILED(rv))
return rv;
-#if defined(XP_MACOSX)
- // First, try locking using fcntl. It is more reliable on
- // a local machine, but may not be supported by an NFS server.
-
- rv = LockWithFcntl(lockFile);
- if (NS_FAILED(rv) && (rv != NS_ERROR_FILE_ACCESS_DENIED))
- {
- // If that failed for any reason other than NS_ERROR_FILE_ACCESS_DENIED,
- // assume we tried an NFS that does not support it. Now, try with symlink.
- rv = LockWithSymlink(lockFile, false);
- }
-
- if (NS_SUCCEEDED(rv))
- {
- // Check for the old-style lock used by pre-mozilla 1.3 builds.
- // Those builds used an earlier check to prevent the application
- // from launching if another instance was already running. Because
- // of that, we don't need to create an old-style lock as well.
- struct LockProcessInfo
- {
- ProcessSerialNumber psn;
- unsigned long launchDate;
- };
-
- PRFileDesc *fd = nullptr;
- int32_t ioBytes;
- ProcessInfoRec processInfo;
- LockProcessInfo lockProcessInfo;
-
- rv = lockFile->SetLeafName(OLD_LOCKFILE_NAME);
- if (NS_FAILED(rv))
- return rv;
- rv = lockFile->OpenNSPRFileDesc(PR_RDONLY, 0, &fd);
- if (NS_SUCCEEDED(rv))
- {
- ioBytes = PR_Read(fd, &lockProcessInfo, sizeof(LockProcessInfo));
- PR_Close(fd);
-
- if (ioBytes == sizeof(LockProcessInfo))
- {
-#ifdef __LP64__
- processInfo.processAppRef = nullptr;
-#else
- processInfo.processAppSpec = nullptr;
-#endif
- processInfo.processName = nullptr;
- processInfo.processInfoLength = sizeof(ProcessInfoRec);
- if (::GetProcessInformation(&lockProcessInfo.psn, &processInfo) == noErr &&
- processInfo.processLaunchDate == lockProcessInfo.launchDate)
- {
- return NS_ERROR_FILE_ACCESS_DENIED;
- }
- }
- else
- {
- NS_WARNING("Could not read lock file - ignoring lock");
- }
- }
- rv = NS_OK; // Don't propagate error from OpenNSPRFileDesc.
- }
-#elif defined(XP_UNIX)
+#if defined(XP_UNIX)
// Get the old lockfile name
nsCOMPtr<nsIFile> oldLockFile;
rv = aProfileDir->Clone(getter_AddRefs(oldLockFile));
diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp
index 2fe51b2853..3380246da1 100644
--- a/toolkit/profile/nsToolkitProfileService.cpp
+++ b/toolkit/profile/nsToolkitProfileService.cpp
@@ -26,11 +26,6 @@
#include "nsIFile.h"
#include "nsISimpleEnumerator.h"
-#ifdef XP_MACOSX
-#include <CoreFoundation/CoreFoundation.h>
-#include "nsILocalFileMac.h"
-#endif
-
#include "nsAppDirectoryServiceDefs.h"
#include "nsXULAppAPI.h"
@@ -1025,33 +1020,7 @@ NS_NewToolkitProfileService(nsIToolkitProfileService* *aResult)
nsresult
XRE_GetFileFromPath(const char *aPath, nsIFile* *aResult)
{
-#if defined(XP_MACOSX)
- int32_t pathLen = strlen(aPath);
- if (pathLen > MAXPATHLEN)
- return NS_ERROR_INVALID_ARG;
-
- CFURLRef fullPath =
- CFURLCreateFromFileSystemRepresentation(nullptr, (const UInt8 *) aPath,
- pathLen, true);
- if (!fullPath)
- return NS_ERROR_FAILURE;
-
- nsCOMPtr<nsIFile> lf;
- nsresult rv = NS_NewNativeLocalFile(EmptyCString(), true,
- getter_AddRefs(lf));
- if (NS_SUCCEEDED(rv)) {
- nsCOMPtr<nsILocalFileMac> lfMac = do_QueryInterface(lf, &rv);
- if (NS_SUCCEEDED(rv)) {
- rv = lfMac->InitWithCFURL(fullPath);
- if (NS_SUCCEEDED(rv)) {
- lf.forget(aResult);
- }
- }
- }
- CFRelease(fullPath);
- return rv;
-
-#elif defined(XP_UNIX)
+#if defined(XP_UNIX)
char fullPath[MAXPATHLEN];
if (!realpath(aPath, fullPath))