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

Unified Diff: chrome/browser/power_usage_monitor/power_usage_monitor.h

Issue 2456783002: Decouple PowerUsageMonitor{Impl} from //content/browser (Closed)
Patch Set: change define position of power_usage_moniter_ in ChromeBrowserMain Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/power_usage_monitor/power_usage_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/power_usage_monitor/power_usage_monitor.h
diff --git a/content/browser/power_usage_monitor_impl.h b/chrome/browser/power_usage_monitor/power_usage_monitor.h
similarity index 88%
rename from content/browser/power_usage_monitor_impl.h
rename to chrome/browser/power_usage_monitor/power_usage_monitor.h
index a2c7e96a32f64dc4fa342d6d643ae34472f12219..c166af7917b664de29799d684086abc1f9f1433b 100644
--- a/content/browser/power_usage_monitor_impl.h
+++ b/chrome/browser/power_usage_monitor/power_usage_monitor.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_POWER_USAGE_MONITOR_IMPL_H_
-#define CONTENT_BROWSER_POWER_USAGE_MONITOR_IMPL_H_
+#ifndef CHROME_BROWSER_POWER_USAGE_MONITOR_POWER_USAGE_MONITOR_H_
+#define CHROME_BROWSER_POWER_USAGE_MONITOR_POWER_USAGE_MONITOR_H_
#include "base/containers/hash_tables.h"
#include "base/gtest_prod_util.h"
@@ -11,14 +11,11 @@
#include "base/memory/singleton.h"
#include "base/power_monitor/power_monitor.h"
#include "base/time/time.h"
-#include "content/common/content_export.h"
#include "content/public/browser/browser_message_filter.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "device/battery/battery_status_service.h"
-namespace content {
-
// Record statistics on power usage.
//
// Two main statics are recorded by this class:
@@ -32,8 +29,9 @@ namespace content {
// * Data collection starts after system uptime exceeds 30 minutes.
// * If the machine goes to sleep or all renderers are closed then the current
// measurement is cancelled.
-class CONTENT_EXPORT PowerUsageMonitor : public base::PowerObserver,
- public NotificationObserver {
+
+class PowerUsageMonitor : public base::PowerObserver,
+ public content::NotificationObserver {
public:
class SystemInterface {
public:
@@ -72,8 +70,8 @@ class CONTENT_EXPORT PowerUsageMonitor : public base::PowerObserver,
// Overridden from NotificationObserver:
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) override;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
private:
friend class PowerUsageMonitorTest;
@@ -96,7 +94,7 @@ class CONTENT_EXPORT PowerUsageMonitor : public base::PowerObserver,
std::unique_ptr<device::BatteryStatusService::BatteryUpdateSubscription>
subscription_;
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
std::unique_ptr<SystemInterface> system_interface_;
@@ -128,6 +126,4 @@ class CONTENT_EXPORT PowerUsageMonitor : public base::PowerObserver,
DISALLOW_COPY_AND_ASSIGN(PowerUsageMonitor);
};
-} // namespace content
-
-#endif // CONTENT_BROWSER_POWER_USAGE_MONITOR_IMPL_H_
+#endif // CHROME_BROWSER_POWER_USAGE_MONITOR_POWER_USAGE_MONITOR_H_
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/power_usage_monitor/power_usage_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698