diff -r 000000000000 -r 6474c204b198 security/manager/boot/src/nsBOOTModule.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/security/manager/boot/src/nsBOOTModule.cpp Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "mozilla/ModuleUtils.h" + +#include "nsEntropyCollector.h" +#include "nsSecureBrowserUIImpl.h" +#include "nsSecurityWarningDialogs.h" +#include "nsSiteSecurityService.h" + +NS_GENERIC_FACTORY_CONSTRUCTOR(nsEntropyCollector) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsSecureBrowserUIImpl) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSecurityWarningDialogs, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSiteSecurityService, Init) + +NS_DEFINE_NAMED_CID(NS_ENTROPYCOLLECTOR_CID); +NS_DEFINE_NAMED_CID(NS_SECURITYWARNINGDIALOGS_CID); +NS_DEFINE_NAMED_CID(NS_SECURE_BROWSER_UI_CID); +NS_DEFINE_NAMED_CID(NS_SITE_SECURITY_SERVICE_CID); + +static const mozilla::Module::CIDEntry kBOOTCIDs[] = { + { &kNS_ENTROPYCOLLECTOR_CID, false, nullptr, nsEntropyCollectorConstructor }, + { &kNS_SECURITYWARNINGDIALOGS_CID, false, nullptr, nsSecurityWarningDialogsConstructor }, + { &kNS_SECURE_BROWSER_UI_CID, false, nullptr, nsSecureBrowserUIImplConstructor }, + { &kNS_SITE_SECURITY_SERVICE_CID, false, nullptr, nsSiteSecurityServiceConstructor }, + { nullptr } +}; + +static const mozilla::Module::ContractIDEntry kBOOTContracts[] = { + { NS_ENTROPYCOLLECTOR_CONTRACTID, &kNS_ENTROPYCOLLECTOR_CID }, + { NS_SECURITYWARNINGDIALOGS_CONTRACTID, &kNS_SECURITYWARNINGDIALOGS_CID }, + { NS_SECURE_BROWSER_UI_CONTRACTID, &kNS_SECURE_BROWSER_UI_CID }, + { NS_SSSERVICE_CONTRACTID, &kNS_SITE_SECURITY_SERVICE_CID }, + { nullptr } +}; + +static const mozilla::Module kBootModule = { + mozilla::Module::kVersion, + kBOOTCIDs, + kBOOTContracts +}; + +NSMODULE_DEFN(BOOT) = &kBootModule;