Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: chrome/browser/power/origin_power_map_factory.cc

Issue 447053002: Add Origin Power Map to Store Battery Auditing Data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
5 #include "chrome/browser/power/origin_power_map_factory.h"
6
7 #include "base/memory/singleton.h"
8 #include "chrome/browser/power/origin_power_map.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
11
12 // static
13 OriginPowerMap* OriginPowerMapFactory::GetForProfile(Profile* profile) {
14 return static_cast<OriginPowerMap*>(
15 GetInstance()->GetServiceForBrowserContext(profile, true));
16 }
17
18 // static
19 OriginPowerMapFactory* OriginPowerMapFactory::GetInstance() {
20 return Singleton<OriginPowerMapFactory>::get();
21 }
22
23 OriginPowerMapFactory::OriginPowerMapFactory()
24 : BrowserContextKeyedServiceFactory(
25 "OriginPowerMap",
26 BrowserContextDependencyManager::GetInstance()) {
27 }
28
29 OriginPowerMapFactory::~OriginPowerMapFactory() {
30 }
31
32 KeyedService* OriginPowerMapFactory::BuildServiceInstanceFor(
33 content::BrowserContext* context) const {
34 return new OriginPowerMap();
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698