Chromium Code Reviews| Index: components/power/origin_power_map_factory.h |
| diff --git a/components/power/origin_power_map_factory.h b/components/power/origin_power_map_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c772a2bc4a16285a0f18b1afde441d3cafa86980 |
| --- /dev/null |
| +++ b/components/power/origin_power_map_factory.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_POWER_ORIGIN_POWER_MAP_FACTORY_H_ |
| +#define COMPONENTS_POWER_ORIGIN_POWER_MAP_FACTORY_H_ |
| + |
| +#include "base/memory/singleton.h" |
| +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
|
blundell
2014/08/12 12:49:00
Is this component intended to be used on iOS? Your
Daniel Nishi
2014/08/12 17:33:46
Sadly, iOS is the only platform that doesn't imple
|
| + |
| +namespace power { |
| + |
| +class OriginPowerMap; |
| + |
| +class OriginPowerMapFactory : public BrowserContextKeyedServiceFactory { |
| + public: |
| + static OriginPowerMap* GetForBrowserContext(content::BrowserContext* context); |
| + static OriginPowerMapFactory* GetInstance(); |
| + |
| + private: |
| + friend struct DefaultSingletonTraits<OriginPowerMapFactory>; |
| + |
| + OriginPowerMapFactory(); |
| + virtual ~OriginPowerMapFactory(); |
| + |
| + // BrowserContextKeyedServiceFactory: |
| + virtual KeyedService* BuildServiceInstanceFor( |
| + content::BrowserContext* context) const OVERRIDE; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(OriginPowerMapFactory); |
| +}; |
| + |
| +} // namespace power |
| + |
| +#endif // COMPONENTS_POWER_ORIGIN_POWER_MAP_FACTORY_H_ |