OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ | 5 #ifndef COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ |
6 #define COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ | 6 #define COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback_list.h" | 10 #include "base/callback_list.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" |
12 #include "components/keyed_service/core/keyed_service.h" | 13 #include "components/keyed_service/core/keyed_service.h" |
13 #include "url/gurl.h" | 14 #include "url/gurl.h" |
14 | 15 |
15 namespace power { | 16 namespace power { |
16 | 17 |
17 // Tracks app and website origins and how much power they are consuming while | 18 // Tracks app and website origins and how much power they are consuming while |
18 // running. | 19 // running. |
19 class OriginPowerMap : public KeyedService { | 20 class OriginPowerMap : public KeyedService { |
20 public: | 21 public: |
21 typedef std::map<GURL, int> PercentOriginMap; | 22 typedef std::map<GURL, int> PercentOriginMap; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 double total_consumed_; | 59 double total_consumed_; |
59 | 60 |
60 base::CallbackList<void(void)> callback_list_; | 61 base::CallbackList<void(void)> callback_list_; |
61 | 62 |
62 DISALLOW_COPY_AND_ASSIGN(OriginPowerMap); | 63 DISALLOW_COPY_AND_ASSIGN(OriginPowerMap); |
63 }; | 64 }; |
64 | 65 |
65 } // namespace power | 66 } // namespace power |
66 | 67 |
67 #endif // COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ | 68 #endif // COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ |
OLD | NEW |