| 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 "components/keyed_service/core/keyed_service.h" | 12 #include "components/keyed_service/core/keyed_service.h" |
| 12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 13 | 14 |
| 14 namespace power { | 15 namespace power { |
| 15 | 16 |
| 16 // Tracks app and website origins and how much power they are consuming while | 17 // Tracks app and website origins and how much power they are consuming while |
| 17 // running. | 18 // running. |
| 18 class OriginPowerMap : public KeyedService { | 19 class OriginPowerMap : public KeyedService { |
| 19 public: | 20 public: |
| 20 typedef std::map<GURL, int> PercentOriginMap; | 21 typedef std::map<GURL, int> PercentOriginMap; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 double total_consumed_; | 58 double total_consumed_; |
| 58 | 59 |
| 59 base::CallbackList<void(void)> callback_list_; | 60 base::CallbackList<void(void)> callback_list_; |
| 60 | 61 |
| 61 DISALLOW_COPY_AND_ASSIGN(OriginPowerMap); | 62 DISALLOW_COPY_AND_ASSIGN(OriginPowerMap); |
| 62 }; | 63 }; |
| 63 | 64 |
| 64 } // namespace power | 65 } // namespace power |
| 65 | 66 |
| 66 #endif // COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ | 67 #endif // COMPONENTS_POWER_ORIGIN_POWER_MAP_H_ |
| OLD | NEW |