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

Unified Diff: app/system_monitor.cc

Issue 5310005: Monitor sleep/wake on Mac. Should fix some networking issues arising after sl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « app/system_monitor.h ('k') | app/system_monitor_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/system_monitor.cc
===================================================================
--- app/system_monitor.cc (revision 67272)
+++ app/system_monitor.cc (working copy)
@@ -29,9 +29,15 @@
base::TimeDelta::FromMilliseconds(kDelayedBatteryCheckMs), this,
&SystemMonitor::BatteryCheck);
#endif // defined(ENABLE_BATTERY_MONITORING)
+#if defined(OS_MACOSX)
+ PlatformInit();
+#endif
}
SystemMonitor::~SystemMonitor() {
+#if defined(OS_MACOSX)
+ PlatformDestroy();
+#endif
DCHECK_EQ(this, g_system_monitor);
g_system_monitor = NULL;
}
@@ -78,18 +84,18 @@
}
void SystemMonitor::NotifyPowerStateChange() {
- VLOG(1) << L"PowerStateChange: " << (BatteryPower() ? L"On" : L"Off")
- << L" battery";
+ VLOG(1) << "PowerStateChange: " << (BatteryPower() ? "On" : "Off")
+ << " battery";
observer_list_->Notify(&PowerObserver::OnPowerStateChange, BatteryPower());
}
void SystemMonitor::NotifySuspend() {
- VLOG(1) << L"Power Suspending";
+ VLOG(1) << "Power Suspending";
observer_list_->Notify(&PowerObserver::OnSuspend);
}
void SystemMonitor::NotifyResume() {
- VLOG(1) << L"Power Resuming";
+ VLOG(1) << "Power Resuming";
observer_list_->Notify(&PowerObserver::OnResume);
}
« no previous file with comments | « app/system_monitor.h ('k') | app/system_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698