3
===================================================================
4
RCS file: /cvsroot/mozilla/profile/src/nsProfile.cpp,v
5
retrieving revision 1.298
6
diff -u -r1.298 nsProfile.cpp
7
--- nsProfile.cpp 28 Feb 2004 22:34:02 -0000 1.298
8
+++ nsProfile.cpp 19 Apr 2004 06:24:40 -0000
12
#include "nsProfile.h"
13
+#ifdef MOZ_PROFILELOCKING
14
#include "nsProfileLock.h"
16
#include "nsIPrefService.h"
17
#include "nsIPrefBranch.h"
20
profileURLStr = PROFILE_MANAGER_URL;
23
+#ifdef MOZ_PROFILELOCKING
24
// If the profile is locked, we need the UI
25
nsCOMPtr<nsILocalFile> localFile(do_QueryInterface(curProfileDir));
26
nsProfileLock tempLock;
27
rv = tempLock.Lock(localFile);
29
profileURLStr = PROFILE_MANAGER_URL;
39
+#ifdef MOZ_PROFILELOCKING
40
nsProfileLock localLock;
41
nsCOMPtr<nsILocalFile> localProfileDir(do_QueryInterface(profileDir, &rv));
42
if (NS_FAILED(rv)) return rv;
44
NS_ERROR("Could not get profile directory lock.");
49
nsCOMPtr<nsIObserverService> observerService =
50
do_GetService("@mozilla.org/observer-service;1", &rv);
51
NS_ENSURE_TRUE(observerService, NS_ERROR_FAILURE);
52
@@ -1237,8 +1241,10 @@
53
UpdateCurrentProfileModTime(PR_FALSE);
56
+#ifdef MOZ_PROFILELOCKING
57
// Do the profile switch
58
localLock.Unlock(); // gDirServiceProvider will get and hold its own lock
60
gDirServiceProvider->SetProfileDir(profileDir);
61
mCurrentProfileName.Assign(aCurrentProfile);
62
gProfileDataAccess->SetCurrentProfile(aCurrentProfile);