Content settings: remove some plugin-related code/resources when... there are no...
[chromium-blink-merge.git] / components / power / origin_power_map_factory.cc
blobf1df4ff5613ae278ac7b9ab3718db5f33be104c9
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.
5 #include "components/power/origin_power_map_factory.h"
7 #include "base/memory/singleton.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "components/power/origin_power_map.h"
11 namespace power {
12 // static
13 OriginPowerMap* OriginPowerMapFactory::GetForBrowserContext(
14 content::BrowserContext* context) {
15 return static_cast<OriginPowerMap*>(
16 GetInstance()->GetServiceForBrowserContext(context, true));
19 // static
20 OriginPowerMapFactory* OriginPowerMapFactory::GetInstance() {
21 return base::Singleton<OriginPowerMapFactory>::get();
24 OriginPowerMapFactory::OriginPowerMapFactory()
25 : BrowserContextKeyedServiceFactory(
26 "OriginPowerMap",
27 BrowserContextDependencyManager::GetInstance()) {
30 OriginPowerMapFactory::~OriginPowerMapFactory() {
33 KeyedService* OriginPowerMapFactory::BuildServiceInstanceFor(
34 content::BrowserContext* context) const {
35 return new OriginPowerMap();
38 } // namespace power