yet another cookie rewrite - up to part 3 this time.
- moves core cookie code into nsCookieService.{h,cpp}, and kills nsCookies & nsCookieManager
- makes nsCookieService a singleton object that implements nsICookieManager also
- improves mem efficiency of the nsCookie object, and removes unneeded conversions
- adds an nsICookie2 interface to extend the sucky nsICookie.
- fixes a few (unrelated) trivial things while I'm in there (use ->ASCII instead of ->UTF8, and remove some erroneous stuff in nsPermissionManager.h)
cvs removal of nsCookies.{h,cpp} and nsCookieManager.{h,cpp} will follow; to find old blame info and logs for those files, look in attic.
burn the witch!
b=200632, r=alecf, sr=darin.
git-svn-id: svn://10.0.0.236/trunk@143712 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -43,7 +43,6 @@
|
||||
#include "nsCookie.h"
|
||||
#include "nsCCookie.h"
|
||||
#include "nsPermission.h"
|
||||
#include "nsCookieManager.h"
|
||||
#include "nsCCookieManager.h"
|
||||
#include "nsCookieService.h"
|
||||
#include "nsImgManager.h"
|
||||
@@ -58,8 +57,7 @@
|
||||
// Define the constructor function for the objects
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCookie)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPermission)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCookieManager, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCookieService, Init)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsCookieService, nsCookieService::GetSingleton)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsImgManager, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPermissionManager, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPopupWindowManager, Init)
|
||||
@@ -114,7 +112,7 @@ static const nsModuleComponentInfo components[] = {
|
||||
{ "CookieManager",
|
||||
NS_COOKIEMANAGER_CID,
|
||||
NS_COOKIEMANAGER_CONTRACTID,
|
||||
nsCookieManagerConstructor
|
||||
nsCookieServiceConstructor
|
||||
},
|
||||
{ "CookieService",
|
||||
NS_COOKIESERVICE_CID,
|
||||
@@ -156,4 +154,11 @@ static const nsModuleComponentInfo components[] = {
|
||||
},
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE(nsCookieModule, components)
|
||||
PR_STATIC_CALLBACK(void)
|
||||
cookieModuleDtor(nsIModule *aSelf)
|
||||
{
|
||||
// Release our singletons
|
||||
nsCookieService::FreeSingleton();
|
||||
}
|
||||
|
||||
NS_IMPL_NSGETMODULE_WITH_DTOR(nsCookieModule, components, cookieModuleDtor)
|
||||
|
||||
Reference in New Issue
Block a user