diff options
author | rharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-19 23:08:34 +0000 |
---|---|---|
committer | rharrison@chromium.org <rharrison@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-19 23:08:34 +0000 |
commit | 29e590e75818a5f41df2109222405294eade398c (patch) | |
tree | d3a268b3317c844087a68d9b5f77f318927d5896 /chromeos/dbus/power_supply_status.cc | |
parent | 7042b688fe403f1aa63e0ee5c44f63f4130e0392 (diff) | |
download | chromium_src-29e590e75818a5f41df2109222405294eade398c.zip chromium_src-29e590e75818a5f41df2109222405294eade398c.tar.gz chromium_src-29e590e75818a5f41df2109222405294eade398c.tar.bz2 |
Extract the averaged time values from incomming protobuf
This CL adds in extracting the averaged battery time values from the incomming protobuf and storing it
in an instance of PowerSupplyStatus.
BUG=chromium-os:23647
TEST=Confirmed that build still worked.
Review URL: http://codereview.chromium.org/10108028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/power_supply_status.cc')
-rw-r--r-- | chromeos/dbus/power_supply_status.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chromeos/dbus/power_supply_status.cc b/chromeos/dbus/power_supply_status.cc index a008e8a..907a55e1 100644 --- a/chromeos/dbus/power_supply_status.cc +++ b/chromeos/dbus/power_supply_status.cc @@ -15,6 +15,8 @@ PowerSupplyStatus::PowerSupplyStatus() battery_is_full(false), battery_seconds_to_empty(0), battery_seconds_to_full(0), + averaged_battery_time_to_empty(0), + averaged_battery_time_to_full(0), battery_percentage(0), is_calculating_battery_time(false) {} @@ -39,6 +41,12 @@ std::string PowerSupplyStatus::ToString() const { "battery_seconds_to_full = %"PRId64" ", battery_seconds_to_full); base::StringAppendF(&result, + "averaged_battery_time_to_empty = %"PRId64" ", + averaged_battery_time_to_empty); + base::StringAppendF(&result, + "averaged_battery_time_to_full = %"PRId64" ", + averaged_battery_time_to_full); + base::StringAppendF(&result, "is_calculating_battery_time = %s ", is_calculating_battery_time ? "true" : "false"); |