~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to patches/240936-profilelock.diff

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
? profilelock.diff
 
2
Index: nsProfile.cpp
 
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
 
9
@@ -37,7 +37,9 @@
 
10
 
 
11
 #include "nscore.h" 
 
12
 #include "nsProfile.h"
 
13
+#ifdef MOZ_PROFILELOCKING
 
14
 #include "nsProfileLock.h"
 
15
+#endif
 
16
 #include "nsIPrefService.h"
 
17
 #include "nsIPrefBranch.h"
 
18
 
 
19
@@ -499,12 +501,14 @@
 
20
                 profileURLStr = PROFILE_MANAGER_URL; 
 
21
             if (exists)
 
22
             {
 
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);
 
28
                 if (NS_FAILED(rv))
 
29
                     profileURLStr = PROFILE_MANAGER_URL;
 
30
+#endif
 
31
             } 
 
32
         }
 
33
         else
 
34
@@ -1173,7 +1177,7 @@
 
35
     }
 
36
     else
 
37
         isSwitch = PR_FALSE;
 
38
-    
 
39
+#ifdef MOZ_PROFILELOCKING    
 
40
     nsProfileLock localLock;
 
41
     nsCOMPtr<nsILocalFile> localProfileDir(do_QueryInterface(profileDir, &rv));
 
42
     if (NS_FAILED(rv)) return rv;
 
43
@@ -1183,7 +1187,7 @@
 
44
         NS_ERROR("Could not get profile directory lock.");
 
45
         return rv;
 
46
     }
 
47
-
 
48
+#endif
 
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);        
 
54
     }
 
55
 
 
56
+#ifdef MOZ_PROFILELOCKING    
 
57
     // Do the profile switch
 
58
     localLock.Unlock(); // gDirServiceProvider will get and hold its own lock
 
59
+#endif
 
60
     gDirServiceProvider->SetProfileDir(profileDir);  
 
61
     mCurrentProfileName.Assign(aCurrentProfile);    
 
62
     gProfileDataAccess->SetCurrentProfile(aCurrentProfile);