storage/build/mozStorageModule.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: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     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 "nsCOMPtr.h"
     7 #include "mozilla/ModuleUtils.h"
     9 #include "mozStorageService.h"
    10 #include "mozStorageConnection.h"
    11 #include "VacuumManager.h"
    13 #include "mozStorageCID.h"
    15 namespace mozilla {
    16 namespace storage {
    18 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(Service,
    19                                          Service::getSingleton)
    20 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(VacuumManager,
    21                                          VacuumManager::getSingleton)
    23 } // namespace storage
    24 } // namespace mozilla
    26 NS_DEFINE_NAMED_CID(MOZ_STORAGE_SERVICE_CID);
    27 NS_DEFINE_NAMED_CID(VACUUMMANAGER_CID);
    29 static const mozilla::Module::CIDEntry kStorageCIDs[] = {
    30     { &kMOZ_STORAGE_SERVICE_CID, false, nullptr, mozilla::storage::ServiceConstructor },
    31     { &kVACUUMMANAGER_CID, false, nullptr, mozilla::storage::VacuumManagerConstructor },
    32     { nullptr }
    33 };
    35 static const mozilla::Module::ContractIDEntry kStorageContracts[] = {
    36     { MOZ_STORAGE_SERVICE_CONTRACTID, &kMOZ_STORAGE_SERVICE_CID },
    37     { VACUUMMANAGER_CONTRACTID, &kVACUUMMANAGER_CID },
    38     { nullptr }
    39 };
    41 static const mozilla::Module::CategoryEntry kStorageCategories[] = {
    42     { "idle-daily", "MozStorage Vacuum Manager", VACUUMMANAGER_CONTRACTID },
    43     { nullptr }
    44 };
    46 static const mozilla::Module kStorageModule = {
    47     mozilla::Module::kVersion,
    48     kStorageCIDs,
    49     kStorageContracts,
    50     kStorageCategories
    51 };
    53 NSMODULE_DEFN(mozStorageModule) = &kStorageModule;

mercurial