diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-11 21:10:27 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-11 21:10:27 +0000 |
commit | 671827e93872d5797768a4a5d3c38b964bb19477 (patch) | |
tree | c1087eeff2cf06a5aa889e059713df0a39dfed16 /base/system_monitor/system_monitor.h | |
parent | 3723e6e61b628ec2750614bc07355478d2dc6bcc (diff) | |
download | chromium_src-671827e93872d5797768a4a5d3c38b964bb19477.zip chromium_src-671827e93872d5797768a4a5d3c38b964bb19477.tar.gz chromium_src-671827e93872d5797768a4a5d3c38b964bb19477.tar.bz2 |
Revert 138011 - Base: Add power requirements to the System monitor.
The only thing we need in the short term is CPU_REQUIRED,
and that part is implemented for all platforms (as far as it
makes sense). The other options are implemented for Windows,
but given that currently there's no user, I expect the
implementation for other platforms to be written when there's
an actual need for it.
BUG=126591
TEST=base_unittests
TBR=brettw
Review URL: https://chromiumcodereview.appspot.com/10546101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/system_monitor/system_monitor.h')
-rw-r--r-- | base/system_monitor/system_monitor.h | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/base/system_monitor/system_monitor.h b/base/system_monitor/system_monitor.h index 7bff799..d960fa2 100644 --- a/base/system_monitor/system_monitor.h +++ b/base/system_monitor/system_monitor.h @@ -6,14 +6,11 @@ #define BASE_SYSTEM_MONITOR_SYSTEM_MONITOR_H_ #pragma once -#include <map> #include <string> -#include <utility> #include <vector> #include "base/base_export.h" #include "base/basictypes.h" -#include "base/threading/thread_checker.h" #include "base/tuple.h" #include "build/build_config.h" @@ -51,13 +48,6 @@ class BASE_EXPORT SystemMonitor { RESUME_EVENT // The system is being resumed. }; - enum PowerRequirement { - DISPLAY_REQUIRED, // The display should not be shut down. - SYSTEM_REQUIRED, // The system should not be suspended. - CPU_REQUIRED, // The process should not be suspended. - TEST_REQUIRED // This is used by unit tests. - }; - typedef unsigned int DeviceIdType; // (Media device id, Media device name, Media device path) typedef Tuple3<DeviceIdType, std::string, FilePath> MediaDeviceInfo; @@ -162,22 +152,6 @@ class BASE_EXPORT SystemMonitor { // Returns information for attached media devices. std::vector<MediaDeviceInfo> GetAttachedMediaDevices() const; - // Enters or leaves a period of time with a given |requirement|. If the - // operation has multiple requirements, make sure to use a unique |reason| for - // each one. Reusing the same |reason| is OK as far as the |requirement| is - // the same in every call, and each BeginPowerRequirement call is paired with - // a call to EndPowerRequirement. |reason| is expected to be an ASCII string. - // Must be called from the thread that created the SystemMonitor. - // Warning: Please remember that sleep deprivation is not a good thing; use - // with caution. - void BeginPowerRequirement(PowerRequirement requirement, - const std::string& reason); - void EndPowerRequirement(PowerRequirement requirement, - const std::string& reason); - - // Returns the number of outsanding power requirement requests. - size_t GetPowerRequirementsCountForTest() const; - private: typedef std::map<base::SystemMonitor::DeviceIdType, MediaDeviceInfo> MediaDeviceMap; @@ -211,11 +185,6 @@ class BASE_EXPORT SystemMonitor { bool battery_in_use_; bool suspended_; -#if defined(OS_WIN) - std::map<std::string, std::pair<HANDLE, int> > handles_; - base::ThreadChecker thread_checker_; -#endif - #if defined(ENABLE_BATTERY_MONITORING) base::OneShotTimer<SystemMonitor> delayed_battery_check_; #endif |