summaryrefslogtreecommitdiffstats
path: root/base/system_monitor.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 17:59:38 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 17:59:38 +0000
commit4d9ae4ab9dd6d4f27c5cef5481f41979b3d58d1b (patch)
tree9978d5c639d3906ce700cc687170a6800243001b /base/system_monitor.cc
parent09d38ad48a2273d2e677e78d4828fa2c8bc65797 (diff)
downloadchromium_src-4d9ae4ab9dd6d4f27c5cef5481f41979b3d58d1b.zip
chromium_src-4d9ae4ab9dd6d4f27c5cef5481f41979b3d58d1b.tar.gz
chromium_src-4d9ae4ab9dd6d4f27c5cef5481f41979b3d58d1b.tar.bz2
Simplify the PowerObserver API by removing unneeded args and providing default implementations.
This also makes all the subclasses use the same code to add/remove observers. BUG=none TEST=none Review URL: http://codereview.chromium.org/244054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/system_monitor.cc')
-rw-r--r--base/system_monitor.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/system_monitor.cc b/base/system_monitor.cc
index cf946a7..44cdce5 100644
--- a/base/system_monitor.cc
+++ b/base/system_monitor.cc
@@ -60,17 +60,17 @@ void SystemMonitor::RemoveObserver(PowerObserver* obs) {
void SystemMonitor::NotifyPowerStateChange() {
LOG(INFO) << L"PowerStateChange: "
<< (BatteryPower() ? L"On" : L"Off") << L" battery";
- observer_list_->Notify(&PowerObserver::OnPowerStateChange, this);
+ observer_list_->Notify(&PowerObserver::OnPowerStateChange, BatteryPower());
}
void SystemMonitor::NotifySuspend() {
LOG(INFO) << L"Power Suspending";
- observer_list_->Notify(&PowerObserver::OnSuspend, this);
+ observer_list_->Notify(&PowerObserver::OnSuspend);
}
void SystemMonitor::NotifyResume() {
LOG(INFO) << L"Power Resuming";
- observer_list_->Notify(&PowerObserver::OnResume, this);
+ observer_list_->Notify(&PowerObserver::OnResume);
}
// static