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

Unified Diff: chromeos/dbus/power_supply_status.cc

Issue 10108028: Extract the averaged time values from incomming protobuf (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « chromeos/dbus/power_supply_status.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/power_supply_status.cc
diff --git a/chromeos/dbus/power_supply_status.cc b/chromeos/dbus/power_supply_status.cc
index a008e8a6339bc54b429460023b7ce0befe91bdaa..907a55e1d86a8b6433e84233dce32c12a5977646 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");
« no previous file with comments | « chromeos/dbus/power_supply_status.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698