Add optional log file leaf name param to XPI_Init for Win32 uninstall logging.

Part of fix for nsbeta2+ bug 37168.  [r=ssu]


git-svn-id: svn://10.0.0.236/trunk@73963 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sgehani%netscape.com
2000-07-10 23:15:46 +00:00
parent 605f7ed5a9
commit 008fb4035e
8 changed files with 32 additions and 11 deletions

View File

@@ -99,6 +99,7 @@ static NS_DEFINE_CID(knsRegistryCID, NS_REGISTRY_CID);
nsSoftwareUpdate* nsSoftwareUpdate::mInstance = nsnull;
nsCOMPtr<nsIFile> nsSoftwareUpdate::mProgramDir = nsnull;
char* nsSoftwareUpdate::mLogName = nsnull;
#if NOTIFICATION_ENABLE
#include "nsUpdateNotification.h"
@@ -182,6 +183,8 @@ nsSoftwareUpdate::~nsSoftwareUpdate()
//NS_IF_RELEASE( mProgramDir );
NS_IF_RELEASE (mMasterListener);
mInstance = nsnull;
PR_FREEIF(mLogName);
}
@@ -533,13 +536,16 @@ nsSoftwareUpdate::RegisterNameset()
NS_IMETHODIMP
nsSoftwareUpdate::StubInitialize(nsIFile *aDir)
nsSoftwareUpdate::StubInitialize(nsIFile *aDir, const char* logName)
{
if (mStubLockout)
return NS_ERROR_ABORT;
else if ( !aDir )
return NS_ERROR_NULL_POINTER;
if (logName)
PL_strcpy(mLogName, logName);
// only allow once, it could be a mess if we've already started installing
mStubLockout = PR_TRUE;