michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include michael@0: michael@0: #include "nscore.h" michael@0: michael@0: #include "nsID.h" michael@0: #include "nsIComponentManager.h" michael@0: #include "nsIServiceManager.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIModule.h" michael@0: #include "mozilla/ModuleUtils.h" michael@0: #include "mozilla/scache/StartupCache.h" michael@0: michael@0: using namespace mozilla::scache; michael@0: michael@0: // XXX Need help with guard for ENABLE_TEST michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(StartupCacheWrapper, michael@0: StartupCacheWrapper::GetSingleton) michael@0: NS_DEFINE_NAMED_CID(NS_STARTUPCACHE_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kStartupCacheCIDs[] = { michael@0: { &kNS_STARTUPCACHE_CID, false, nullptr, StartupCacheWrapperConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kStartupCacheContracts[] = { michael@0: { "@mozilla.org/startupcache/cache;1", &kNS_STARTUPCACHE_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kStartupCacheModule = { michael@0: mozilla::Module::kVersion, michael@0: kStartupCacheCIDs, michael@0: kStartupCacheContracts, michael@0: nullptr, michael@0: nullptr, michael@0: nullptr, michael@0: nullptr michael@0: }; michael@0: michael@0: NSMODULE_DEFN(StartupCacheModule) = &kStartupCacheModule;