| Index: base/system_monitor.cc
|
| ===================================================================
|
| --- base/system_monitor.cc (revision 23214)
|
| +++ base/system_monitor.cc (working copy)
|
| @@ -5,6 +5,7 @@
|
| #include "base/system_monitor.h"
|
| #include "base/logging.h"
|
| #include "base/message_loop.h"
|
| +#include "base/singleton.h"
|
|
|
| namespace base {
|
|
|
| @@ -72,6 +73,14 @@
|
| observer_list_->Notify(&PowerObserver::OnResume, this);
|
| }
|
|
|
| +// static
|
| +SystemMonitor* SystemMonitor::Get() {
|
| + // Uses the LeakySingletonTrait because cleanup is optional.
|
| + return
|
| + Singleton<SystemMonitor, LeakySingletonTraits<SystemMonitor> >::get();
|
| +}
|
| +
|
| +// static
|
| void SystemMonitor::Start() {
|
| #if defined(ENABLE_BATTERY_MONITORING)
|
| DCHECK(MessageLoop::current()); // Can't call start too early.
|
|
|