fix for #15042. fix by=racham, r=sspitzer

This commit is contained in:
sspitzer%netscape.com 1999-12-07 00:22:30 +00:00
parent 9825cbc82b
commit ca3fcac0b6
5 changed files with 361 additions and 1500 deletions

Binary file not shown.

View File

@ -31,6 +31,7 @@ IS_COMPONENT = 1
CPPSRCS = nsProfile.cpp \
nsProfileFactory.cpp \
nsProfileAccess.cpp \
$(NULL)
EXTRA_DSO_LDOPTS = \

View File

@ -89,6 +89,7 @@ LLIBS = \
OBJS = \
.\$(OBJDIR)\nsProfile.obj \
.\$(OBJDIR)\nsProfileFactory.obj \
.\$(OBJDIR)\nsProfileAccess.obj \
$(NULL)
#//------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -27,36 +27,21 @@
#include "nsFileSpec.h"
#include "nsString.h"
#include "nsICmdLineService.h"
/* XXX TODO fix this */
#include "nsProfileAccess.h"
#define _MAX_LENGTH 256
#define _MAX_NUM_PROFILES 50
class nsProfile: public nsIProfile
{
NS_DECL_ISUPPORTS
NS_DECL_NSIPROFILE
NS_DECL_ISUPPORTS
NS_DECL_NSIPROFILE
private:
nsCOMPtr <nsIRegistry> m_reg;
nsresult ProcessArgs(nsICmdLineService *service,
PRBool *profileDirSet,
nsCString & profileURLStr);
nsresult LoadDefaultProfileDir(nsCString & profileURLStr);
nsresult ProcessArgs(nsICmdLineService *service,
PRBool *profileDirSet,
nsCString & profileURLStr);
nsresult LoadDefaultProfileDir(nsCString & profileURLStr);
nsresult OpenRegistry();
nsresult CloseRegistry();
char mNewProfileData[_MAX_NUM_PROFILES][_MAX_LENGTH];
char mProfiles[_MAX_NUM_PROFILES][_MAX_LENGTH];
PRInt32 mCount;
PRInt32 mNumProfiles;
PRInt32 mNumOldProfiles;
char mOldProfiles[_MAX_NUM_PROFILES][_MAX_LENGTH];
char mOldProfLocations[_MAX_NUM_PROFILES][_MAX_LENGTH];
public:
nsProfile();
virtual ~nsProfile();
@ -64,7 +49,7 @@ public:
nsresult RenameProfileDir(const char *newProfileName);
// Creates associated user directories on the creation of a new profile
nsresult CreateUserDirectories(const nsFileSpec& profileDir);
nsresult CreateUserDirectories(const nsFileSpec& profileDir);
// Deletes associated user directories
nsresult DeleteUserDirectories(const nsFileSpec& profileDir);
@ -72,12 +57,7 @@ public:
// Copies all the registry keys from old profile to new profile
nsresult CopyRegKey(const char *oldProfile, const char *newProfile);
// Fills the global array mProfiles by enumerating registry entries
nsresult GetAllProfiles();
nsresult UpdateMozProfileRegistry();
// Fix the version differences by modifying the dir name entries
nsresult FixRegEntries();
// Routine that frees the memory allocated to temp profile struct
void FreeProfileStruct(ProfileStruct* aProfile);
};