remove unused code, now that CreateNewProfile() takes two arguments

This commit is contained in:
sspitzer%netscape.com 1999-10-06 21:52:02 +00:00
Родитель c2038977cf
Коммит 8d1a091315
2 изменённых файлов: 0 добавлений и 82 удалений

Просмотреть файл

@ -1170,82 +1170,6 @@ void nsProfile::DeleteUserDirectories(const nsFileSpec& profileDir)
}
}
// Set the data stream into an array
void nsProfile::SetDataArray(nsString data)
{
#if defined(DEBUG_profile)
printf("ProfileManager : Setting new profile data\n");
printf("SetDataArray data : %s\n", data.ToNewCString());
#endif
PRInt32 idx = 0;
char *newStr=nsnull;
char *tokstr = data.ToNewCString();
char *token = nsCRT::strtok(tokstr, "%", &newStr);
#if defined(DEBUG_profile)
printf("before while loop\n");
#endif
while (token)
{
#if defined(DEBUG_profile)
printf("subTok : %s\n", token);
#endif
PL_strcpy(mNewProfileData[idx], token);
idx++;
mCount = idx;
token = nsCRT::strtok(newStr, "%", &newStr);
}
delete[] tokstr;
#if defined(DEBUG_profile)
printf("after while loop\n");
#endif
}
//Get the value associated with the name from Data Array
// i.e., generated from the data passed by the JS reflection
// request to create a new profile (CreateProfile Wizard).
char* nsProfile::GetValue(char *name)
{
PRInt32 nameLength;
char* value;
value = (char *) PR_Malloc(sizeof(char) * _MAX_LENGTH);
for (PRInt32 i = 0; i < mCount; i=i+1)
{
if (mNewProfileData[i])
{
nameLength = PL_strlen(name);
if (PL_strncmp(name, mNewProfileData[i], nameLength) == 0)
{
char* equalsPosition = PL_strchr(mNewProfileData[i], '=');
if (equalsPosition)
{
PL_strcpy(value, 1 + equalsPosition);
return value;
}
}
}
}
#if defined(DEBUG_profile)
printf("after for loop\n");
#endif
return nsnull;
}
// Rename a old profile to new profile.
// Need to add ProfileExists() routine to avoid the illegal rename operation
// Copies all the keys from old profile to new profile.

Просмотреть файл

@ -64,12 +64,6 @@ public:
// Deletes associated user directories
void DeleteUserDirectories(const nsFileSpec& profileDir);
// Sets profile information recived from the Javascript (routed via core service) into an array
void SetDataArray(nsString data);
// Gets a particular value from the DataArray
char* GetValue(char *name);
// Copies all the registry keys from old profile to new profile
nsresult CopyRegKey(const char *oldProfile, const char *newProfile);