summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/power_supply_status.cc
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 19:35:32 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-06 19:35:32 +0000
commit2781409defa7484f927ffe302c70cebbf7967134 (patch)
tree943afcd2fbda9b5b05d04276c19d0d2d28451a67 /chromeos/dbus/power_supply_status.cc
parentf5fc8ce3401b601e8195dca5a2c05c65ad476bea (diff)
downloadchromium_src-2781409defa7484f927ffe302c70cebbf7967134.zip
chromium_src-2781409defa7484f927ffe302c70cebbf7967134.tar.gz
chromium_src-2781409defa7484f927ffe302c70cebbf7967134.tar.bz2
Adding extraction of is_calculating_battery_time field from protobuf
This CL adds in extracting the value from the incomming protobuf and storing it in an instance of PowerSupplyStatus. BUG=chromium-os:28881 TEST=Confirmed that build still worked. Review URL: https://chromiumcodereview.appspot.com/9977005 Patch from Ryan Harrison <rharrison@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/power_supply_status.cc')
-rw-r--r--chromeos/dbus/power_supply_status.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chromeos/dbus/power_supply_status.cc b/chromeos/dbus/power_supply_status.cc
index cc0d9f2..a008e8a 100644
--- a/chromeos/dbus/power_supply_status.cc
+++ b/chromeos/dbus/power_supply_status.cc
@@ -15,8 +15,8 @@ PowerSupplyStatus::PowerSupplyStatus()
battery_is_full(false),
battery_seconds_to_empty(0),
battery_seconds_to_full(0),
- battery_percentage(0) {
-}
+ battery_percentage(0),
+ is_calculating_battery_time(false) {}
std::string PowerSupplyStatus::ToString() const {
std::string result;
@@ -38,6 +38,10 @@ std::string PowerSupplyStatus::ToString() const {
base::StringAppendF(&result,
"battery_seconds_to_full = %"PRId64" ",
battery_seconds_to_full);
+ base::StringAppendF(&result,
+ "is_calculating_battery_time = %s ",
+ is_calculating_battery_time ? "true" : "false");
+
return result;
}