diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in index 2e1fb7bb4f25..3bcc7b200383 100644 --- a/xpcom/components/Makefile.in +++ b/xpcom/components/Makefile.in @@ -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 \ diff --git a/xpcom/ds/nsObserverService.h b/xpcom/ds/nsObserverService.h index 1f30b79c14a8..0727c2244a0f 100644 --- a/xpcom/ds/nsObserverService.h +++ b/xpcom/ds/nsObserverService.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} diff --git a/xpcom/glue/Makefile.in b/xpcom/glue/Makefile.in index b0883d54d9af..9e1756d18244 100644 --- a/xpcom/glue/Makefile.in +++ b/xpcom/glue/Makefile.in @@ -74,6 +74,7 @@ SDK_HEADERS = \ nsArrayUtils.h \ nsAutoLock.h \ nsBaseHashtable.h \ + nsCategoryCache.h \ nsCOMArray.h \ nsCRTGlue.h \ nsClassHashtable.h \ diff --git a/xpcom/components/nsCategoryCache.cpp b/xpcom/glue/nsCategoryCache.cpp similarity index 96% rename from xpcom/components/nsCategoryCache.cpp rename to xpcom/glue/nsCategoryCache.cpp index 45f0544c4028..1ce55aefa652 100644 --- a/xpcom/components/nsCategoryCache.cpp +++ b/xpcom/glue/nsCategoryCache.cpp @@ -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)); diff --git a/xpcom/components/nsCategoryCache.h b/xpcom/glue/nsCategoryCache.h similarity index 98% rename from xpcom/components/nsCategoryCache.h rename to xpcom/glue/nsCategoryCache.h index c7bfdaaa346d..d72e99b4e433 100644 --- a/xpcom/components/nsCategoryCache.h +++ b/xpcom/glue/nsCategoryCache.h @@ -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); diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk index b8bc5da43bea..ed6d865ed499 100644 --- a/xpcom/glue/objs.mk +++ b/xpcom/glue/objs.mk @@ -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 \