security/manager/boot/src/nsBOOTModule.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/manager/boot/src/nsBOOTModule.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "mozilla/ModuleUtils.h"
    1.10 +
    1.11 +#include "nsEntropyCollector.h"
    1.12 +#include "nsSecureBrowserUIImpl.h"
    1.13 +#include "nsSecurityWarningDialogs.h"
    1.14 +#include "nsSiteSecurityService.h"
    1.15 +
    1.16 +NS_GENERIC_FACTORY_CONSTRUCTOR(nsEntropyCollector)
    1.17 +NS_GENERIC_FACTORY_CONSTRUCTOR(nsSecureBrowserUIImpl)
    1.18 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSecurityWarningDialogs, Init)
    1.19 +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSiteSecurityService, Init)
    1.20 +
    1.21 +NS_DEFINE_NAMED_CID(NS_ENTROPYCOLLECTOR_CID);
    1.22 +NS_DEFINE_NAMED_CID(NS_SECURITYWARNINGDIALOGS_CID);
    1.23 +NS_DEFINE_NAMED_CID(NS_SECURE_BROWSER_UI_CID);
    1.24 +NS_DEFINE_NAMED_CID(NS_SITE_SECURITY_SERVICE_CID);
    1.25 +
    1.26 +static const mozilla::Module::CIDEntry kBOOTCIDs[] = {
    1.27 +  { &kNS_ENTROPYCOLLECTOR_CID, false, nullptr, nsEntropyCollectorConstructor },
    1.28 +  { &kNS_SECURITYWARNINGDIALOGS_CID, false, nullptr, nsSecurityWarningDialogsConstructor },
    1.29 +  { &kNS_SECURE_BROWSER_UI_CID, false, nullptr, nsSecureBrowserUIImplConstructor },
    1.30 +  { &kNS_SITE_SECURITY_SERVICE_CID, false, nullptr, nsSiteSecurityServiceConstructor },
    1.31 +  { nullptr }
    1.32 +};
    1.33 +
    1.34 +static const mozilla::Module::ContractIDEntry kBOOTContracts[] = {
    1.35 +  { NS_ENTROPYCOLLECTOR_CONTRACTID, &kNS_ENTROPYCOLLECTOR_CID },
    1.36 +  { NS_SECURITYWARNINGDIALOGS_CONTRACTID, &kNS_SECURITYWARNINGDIALOGS_CID },
    1.37 +  { NS_SECURE_BROWSER_UI_CONTRACTID, &kNS_SECURE_BROWSER_UI_CID },
    1.38 +  { NS_SSSERVICE_CONTRACTID, &kNS_SITE_SECURITY_SERVICE_CID },
    1.39 +  { nullptr }
    1.40 +};
    1.41 +
    1.42 +static const mozilla::Module kBootModule = {
    1.43 +  mozilla::Module::kVersion,
    1.44 +  kBOOTCIDs,
    1.45 +  kBOOTContracts
    1.46 +};
    1.47 +
    1.48 +NSMODULE_DEFN(BOOT) = &kBootModule;

mercurial