mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 14:44:26 +00:00
Bug 37795 - "Move nsCategoryCache to the XPCOM Glue". nsCategoryCache was initially created as part of Bug 315598 by Christian Biesinger <cbiesinger@gmx.at>. r=bsmedberg.
This commit is contained in:
parent
95dec04fae
commit
2c4edbd812
@ -53,7 +53,6 @@ REQUIRES = string \
|
||||
|
||||
CPPSRCS = \
|
||||
nsCategoryManager.cpp \
|
||||
nsCategoryCache.cpp \
|
||||
nsComponentManager.cpp \
|
||||
nsNativeComponentLoader.cpp \
|
||||
nsStaticComponentLoader.cpp \
|
||||
@ -62,7 +61,6 @@ CPPSRCS = \
|
||||
|
||||
EXPORTS = \
|
||||
nsCategoryManagerUtils.h \
|
||||
nsCategoryCache.h \
|
||||
nsIServiceManagerObsolete.h \
|
||||
nsModule.h \
|
||||
nsObsoleteModuleLoading.h \
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include "nsObserverList.h"
|
||||
#include "nsTHashtable.h"
|
||||
|
||||
#define NS_OBSERVERSERVICE_CONTRACTID "@mozilla.org/observer-service;1"
|
||||
#define NS_OBSERVERSERVICE_CLASSNAME "Observer Service"
|
||||
|
||||
// {D07F5195-E3D1-11d2-8ACD-00105A1B8860}
|
||||
|
@ -74,6 +74,7 @@ SDK_HEADERS = \
|
||||
nsArrayUtils.h \
|
||||
nsAutoLock.h \
|
||||
nsBaseHashtable.h \
|
||||
nsCategoryCache.h \
|
||||
nsCOMArray.h \
|
||||
nsCRTGlue.h \
|
||||
nsClassHashtable.h \
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "nsISupportsPrimitives.h"
|
||||
|
||||
#include "nsXPCOMCID.h"
|
||||
#include "nsObserverService.h"
|
||||
|
||||
#include "nsCategoryCache.h"
|
||||
|
||||
@ -74,7 +73,7 @@ nsCategoryObserver::nsCategoryObserver(const char* aCategory,
|
||||
nsCAutoString categoryEntry;
|
||||
rv = entryName->GetData(categoryEntry);
|
||||
|
||||
nsXPIDLCString entryValue;
|
||||
nsCString entryValue;
|
||||
catMan->GetCategoryEntry(aCategory,
|
||||
categoryEntry.get(),
|
||||
getter_Copies(entryValue));
|
||||
@ -132,7 +131,8 @@ nsCategoryObserver::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!aData || !nsDependentString(aData).EqualsASCII(mCategory.get()))
|
||||
if (!aData ||
|
||||
!nsDependentString(aData).Equals(NS_ConvertASCIItoUTF16(mCategory)))
|
||||
return NS_OK;
|
||||
|
||||
nsCAutoString str;
|
||||
@ -146,7 +146,7 @@ nsCategoryObserver::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
if (!catMan)
|
||||
return NS_OK;
|
||||
|
||||
nsXPIDLCString entryValue;
|
||||
nsCString entryValue;
|
||||
catMan->GetCategoryEntry(mCategory.get(),
|
||||
str.get(),
|
||||
getter_Copies(entryValue));
|
@ -62,7 +62,7 @@ class NS_NO_VTABLE nsCategoryListener {
|
||||
virtual void CategoryCleared() = 0;
|
||||
};
|
||||
|
||||
class NS_COM nsCategoryObserver : public nsIObserver {
|
||||
class NS_COM_GLUE nsCategoryObserver : public nsIObserver {
|
||||
public:
|
||||
nsCategoryObserver(const char* aCategory,
|
||||
nsCategoryListener* aCategoryListener);
|
@ -43,6 +43,7 @@ XPCOM_GLUE_SRC_CSRCS = $(addprefix $(topsrcdir)/xpcom/glue/, $(XPCOM_GLUE_SRC_LC
|
||||
XPCOM_GLUE_SRC_LCPPSRCS = \
|
||||
nsArrayEnumerator.cpp \
|
||||
nsArrayUtils.cpp \
|
||||
nsCategoryCache.cpp \
|
||||
nsCOMPtr.cpp \
|
||||
nsCOMArray.cpp \
|
||||
nsCRTGlue.cpp \
|
||||
|
Loading…
x
Reference in New Issue
Block a user