Bug 204423 Remove unused nsIFindServiceConstructor, nsFindService::GetSingleton, nsFindService::FreeSigleton, empty nsFindModuleDtor

r=brade sr=smfr a=sspitzer
This commit is contained in:
timeless%mozdev.org 2003-05-09 04:17:41 +00:00
Родитель 2b09d219aa
Коммит c3e4703dae
3 изменённых файлов: 2 добавлений и 43 удалений

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

@ -8,9 +8,6 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFindService)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIFindService, nsFindService::GetSingleton)
static const nsModuleComponentInfo gComponents[] = {
{
"Find Service",
@ -18,16 +15,7 @@ static const nsModuleComponentInfo gComponents[] = {
NS_FIND_SERVICE_CONTRACTID,
nsFindServiceConstructor
}
};
PR_STATIC_CALLBACK(void)
nsFindModuleDtor(nsIModule* self)
{
// Release our singletons
nsFindService::FreeSingleton();
}
NS_IMPL_NSGETMODULE_WITH_DTOR(nsFindComponent, gComponents, nsFindModuleDtor)
NS_IMPL_NSGETMODULE(nsFindComponent, gComponents)

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

@ -138,24 +138,3 @@ NS_IMETHODIMP nsFindService::SetMatchCase(PRBool aMatchCase)
return NS_OK;
}
nsFindService* nsFindService::gFindService;
nsFindService*
nsFindService::GetSingleton()
{
if (!gFindService) {
gFindService = new nsFindService();
if (gFindService)
NS_ADDREF(gFindService);
}
NS_IF_ADDREF(gFindService);
return gFindService;
}
void
nsFindService::FreeSingleton()
{
NS_IF_RELEASE(gFindService);
}

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

@ -65,14 +65,7 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSIFINDSERVICE
static nsFindService* GetSingleton();
static void FreeSingleton();
protected:
static nsFindService* gFindService;
protected:
nsString mSearchString;
@ -82,5 +75,4 @@ protected:
PRPackedBool mWrapFind;
PRPackedBool mEntireWord;
PRPackedBool mMatchCase;
};