extension_pref_value_map_factory.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_FACTORY_H_
  5. #define EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_FACTORY_H_
  6. #include "base/memory/singleton.h"
  7. #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
  8. class ExtensionPrefValueMap;
  9. // The usual factory boilerplate for ExtensionPrefValueMap.
  10. class ExtensionPrefValueMapFactory : public BrowserContextKeyedServiceFactory {
  11. public:
  12. static ExtensionPrefValueMap* GetForBrowserContext(
  13. content::BrowserContext* context);
  14. static ExtensionPrefValueMapFactory* GetInstance();
  15. private:
  16. friend struct base::DefaultSingletonTraits<ExtensionPrefValueMapFactory>;
  17. ExtensionPrefValueMapFactory();
  18. ~ExtensionPrefValueMapFactory() override;
  19. KeyedService* BuildServiceInstanceFor(
  20. content::BrowserContext* context) const override;
  21. content::BrowserContext* GetBrowserContextToUse(
  22. content::BrowserContext* context) const override;
  23. };
  24. #endif // EXTENSIONS_BROWSER_EXTENSION_PREF_VALUE_MAP_FACTORY_H_