security/manager/boot/src/nsBOOTModule.cpp

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "mozilla/ModuleUtils.h"
     8 #include "nsEntropyCollector.h"
     9 #include "nsSecureBrowserUIImpl.h"
    10 #include "nsSecurityWarningDialogs.h"
    11 #include "nsSiteSecurityService.h"
    13 NS_GENERIC_FACTORY_CONSTRUCTOR(nsEntropyCollector)
    14 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSecureBrowserUIImpl)
    15 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSecurityWarningDialogs, Init)
    16 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsSiteSecurityService, Init)
    18 NS_DEFINE_NAMED_CID(NS_ENTROPYCOLLECTOR_CID);
    19 NS_DEFINE_NAMED_CID(NS_SECURITYWARNINGDIALOGS_CID);
    20 NS_DEFINE_NAMED_CID(NS_SECURE_BROWSER_UI_CID);
    21 NS_DEFINE_NAMED_CID(NS_SITE_SECURITY_SERVICE_CID);
    23 static const mozilla::Module::CIDEntry kBOOTCIDs[] = {
    24   { &kNS_ENTROPYCOLLECTOR_CID, false, nullptr, nsEntropyCollectorConstructor },
    25   { &kNS_SECURITYWARNINGDIALOGS_CID, false, nullptr, nsSecurityWarningDialogsConstructor },
    26   { &kNS_SECURE_BROWSER_UI_CID, false, nullptr, nsSecureBrowserUIImplConstructor },
    27   { &kNS_SITE_SECURITY_SERVICE_CID, false, nullptr, nsSiteSecurityServiceConstructor },
    28   { nullptr }
    29 };
    31 static const mozilla::Module::ContractIDEntry kBOOTContracts[] = {
    32   { NS_ENTROPYCOLLECTOR_CONTRACTID, &kNS_ENTROPYCOLLECTOR_CID },
    33   { NS_SECURITYWARNINGDIALOGS_CONTRACTID, &kNS_SECURITYWARNINGDIALOGS_CID },
    34   { NS_SECURE_BROWSER_UI_CONTRACTID, &kNS_SECURE_BROWSER_UI_CID },
    35   { NS_SSSERVICE_CONTRACTID, &kNS_SITE_SECURITY_SERVICE_CID },
    36   { nullptr }
    37 };
    39 static const mozilla::Module kBootModule = {
    40   mozilla::Module::kVersion,
    41   kBOOTCIDs,
    42   kBOOTContracts
    43 };
    45 NSMODULE_DEFN(BOOT) = &kBootModule;

mercurial