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

Unified Diff: chromeos/dbus/power_manager_client.cc

Issue 12082103: chromeos: Pass suspend-delay description to powerd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/power_manager_client.cc
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index 0dfa12b4e8d4b3076cd25e3a8aef93e4e1274252..8b0adb8145da4cba16467c0e58a7b2bc6e76a0d6 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -28,8 +28,13 @@
namespace chromeos {
+// Maximum amount of time that the power manager will wait for Chrome to
+// say that it's ready for the system to be suspended, in milliseconds.
const int kSuspendDelayTimeoutMs = 5000;
+// Human-readable description of Chrome's suspend delay.
+const char kSuspendDelayDescription[] = "chrome";
+
// The PowerManagerClient implementation used in production.
class PowerManagerClientImpl : public PowerManagerClient {
public:
@@ -125,6 +130,7 @@ class PowerManagerClientImpl : public PowerManagerClient {
base::TimeDelta timeout =
base::TimeDelta::FromMilliseconds(kSuspendDelayTimeoutMs);
protobuf_request.set_timeout(timeout.ToInternalValue());
+ protobuf_request.set_description(kSuspendDelayDescription);
if (!writer.AppendProtoAsArrayOfBytes(protobuf_request)) {
LOG(ERROR) << "Error constructing message for "
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698