remove the old imgmanager from cookies.
bug 287628, r=dwitte, sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@171316 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
#include "nsIModule.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsImgManager.h"
|
||||
#include "nsPermissionManager.h"
|
||||
#include "nsPopupWindowManager.h"
|
||||
#include "nsICategoryManager.h"
|
||||
@@ -48,52 +47,13 @@
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
// Define the constructor function for the objects
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsImgManager, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPermissionManager, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPopupWindowManager, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCookiePermission, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCookiePromptService)
|
||||
|
||||
static NS_METHOD
|
||||
RegisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
|
||||
const char *registryLocation, const char *componentType,
|
||||
const nsModuleComponentInfo *info)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICategoryManager> catman =
|
||||
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsXPIDLCString previous;
|
||||
return catman->AddCategoryEntry("content-policy",
|
||||
NS_IMGMANAGER_CONTRACTID,
|
||||
NS_IMGMANAGER_CONTRACTID,
|
||||
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
||||
}
|
||||
|
||||
static NS_METHOD
|
||||
UnregisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
|
||||
const char *registryLocation,
|
||||
const nsModuleComponentInfo *info)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICategoryManager> catman =
|
||||
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return catman->DeleteCategoryEntry("content-policy",
|
||||
NS_IMGMANAGER_CONTRACTID,
|
||||
PR_TRUE);
|
||||
}
|
||||
|
||||
|
||||
// The list of components we register
|
||||
static const nsModuleComponentInfo components[] = {
|
||||
{ "ImgManager",
|
||||
NS_IMGMANAGER_CID,
|
||||
NS_IMGMANAGER_CONTRACTID,
|
||||
nsImgManagerConstructor,
|
||||
RegisterContentPolicy, UnregisterContentPolicy
|
||||
},
|
||||
{ "PermissionManager",
|
||||
NS_PERMISSIONMANAGER_CID,
|
||||
NS_PERMISSIONMANAGER_CONTRACTID,
|
||||
|
||||
Reference in New Issue
Block a user