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

Unified Diff: base/power_monitor/power_monitor_win.cc

Issue 10959020: SystemMonitor refactoring: move power state monitor into a separate class called PowerMonitor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update patch per vandebo's comments Created 8 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
Index: base/power_monitor/power_monitor_win.cc
diff --git a/base/system_monitor/system_monitor_win.cc b/base/power_monitor/power_monitor_win.cc
similarity index 91%
rename from base/system_monitor/system_monitor_win.cc
rename to base/power_monitor/power_monitor_win.cc
index a8cd54a6db1b8e27716e9b489650c30e8ce849ec..15086efa3f3c774e7f3129a770b22dcd10391972 100644
--- a/base/system_monitor/system_monitor_win.cc
+++ b/base/power_monitor/power_monitor_win.cc
@@ -2,11 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/system_monitor/system_monitor.h"
+#include "base/power_monitor/power_monitor.h"
namespace base {
-
-void SystemMonitor::ProcessWmPowerBroadcastMessage(int event_id) {
+void PowerMonitor::ProcessWmPowerBroadcastMessage(int event_id) {
vandebo (ex-Chrome) 2012/10/11 20:49:57 nit: blank line after namespace.
Hongbo Min 2012/10/12 14:43:53 Done.
PowerEvent power_event;
switch (event_id) {
case PBT_APMPOWERSTATUSCHANGE: // The power status changed.
@@ -38,7 +37,7 @@ void SystemMonitor::ProcessWmPowerBroadcastMessage(int event_id) {
// Function to query the system to see if it is currently running on
// battery power. Returns true if running on battery.
-bool SystemMonitor::IsBatteryPower() {
+bool PowerMonitor::IsBatteryPower() {
SYSTEM_POWER_STATUS status;
if (!GetSystemPowerStatus(&status)) {
DLOG(ERROR) << "GetSystemPowerStatus failed: " << GetLastError();

Powered by Google App Engine
This is Rietveld 408576698