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

Unified Diff: base/system_monitor.cc

Issue 164424: Simple cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 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
« no previous file with comments | « base/system_monitor.h ('k') | chrome/browser/safe_browsing/safe_browsing_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « base/system_monitor.h ('k') | chrome/browser/safe_browsing/safe_browsing_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698