diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 18:15:03 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 18:15:03 +0000 |
commit | 4c2ab43245031b082289bd209f9ff4f3912ebccb (patch) | |
tree | a3fb39e79cb2121f547d4f088275450d46a1230d /base/system_monitor.cc | |
parent | ab295637537b23093388b1dc0b8395e7f4c2088d (diff) | |
download | chromium_src-4c2ab43245031b082289bd209f9ff4f3912ebccb.zip chromium_src-4c2ab43245031b082289bd209f9ff4f3912ebccb.tar.gz chromium_src-4c2ab43245031b082289bd209f9ff4f3912ebccb.tar.bz2 |
Simple cleanup.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/164424
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/system_monitor.cc')
-rw-r--r-- | base/system_monitor.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/base/system_monitor.cc b/base/system_monitor.cc index dd5aa60..cf946a7 100644 --- a/base/system_monitor.cc +++ b/base/system_monitor.cc @@ -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 @@ void SystemMonitor::NotifyResume() { 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. |