Commit 2fdeba1b authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Rewrite PowerSaveBlockerLinux [2/4]

* Removed SelectAPI() which relied on the XDG_CURRENT_DESKTOP environment
  variable. The correct approach is to check the presence of each DBus API
  directly.
* Remove unnecessary |freedesktop_suspend_delegate_|. PowerSaveBlocker::Delegate
  can now hold multiple inhibit cookies, so having multiple delegates is no
  longer needed.

BUG=1013812
TEST=Tested on GNOME and KDE environments
R=blundell

Change-Id: Ia338a12a70e3deed72166e5a980eec64767a7f92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1926852
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718417}
parent a076c304
......@@ -61,13 +61,6 @@ class PowerSaveBlocker {
// };
scoped_refptr<Delegate> delegate_;
#if defined(USE_X11)
// Since display sleep prevention also implies system suspend prevention, for
// the Linux FreeDesktop API case, there needs to be a second delegate to
// block system suspend when screen saver / display sleep is blocked.
scoped_refptr<Delegate> freedesktop_suspend_delegate_;
#endif
scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment