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

Unified Diff: content/browser/power_save_blocker.h

Issue 10545076: Implement PowerSaveBlocker2 for Linux. Much simpler than the original! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
Index: content/browser/power_save_blocker.h
===================================================================
--- content/browser/power_save_blocker.h (revision 141149)
+++ content/browser/power_save_blocker.h (working copy)
@@ -60,6 +60,7 @@
// NOT READY YET. PowerSaveBlocker above is soon to be replaced by this class,
// but it's not done yet so client code should use the one above for now.
// A RAII-style class to block the system from entering low-power (sleep) mode.
+// This class is thread-safe; it may be constructed and deleted on any thread.
class CONTENT_EXPORT PowerSaveBlocker2 {
public:
enum PowerSaveBlockerType {
@@ -89,9 +90,12 @@
// Implementations of this class may need a second object with different
// lifetime than the RAII container, or additional storage. This member is
// here for that purpose. If not used, just define the class as an empty
- // RefCounted like so to make it compile:
+ // RefCounted (or RefCountedThreadSafe) like so to make it compile:
// class PowerSaveBlocker2::Delegate
- // : public RefCounted<PowerSaveBlocker2::Delegate> {
+ // : public base::RefCounted<PowerSaveBlocker2::Delegate> {
+ // private:
+ // friend class base::RefCounted<Delegate>;
+ // ~Delegate() {}
Avi (use Gerrit) 2012/06/08 14:35:48 True dat.
// };
scoped_refptr<Delegate> delegate_;
« no previous file with comments | « no previous file | content/browser/power_save_blocker_linux.cc » ('j') | content/browser/power_save_blocker_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698