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

Unified Diff: ash/system/power/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 | « ash/system/power/power_supply_status.h ('k') | chromeos/dbus/power_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/power/power_supply_status.cc
diff --git a/ash/system/power/power_supply_status.cc b/ash/system/power/power_supply_status.cc
index 1f131708bb5b40d8b30ff602ee926e9aa998eb1b..a61b3a5ef416f7891b9a5475d170e3c33171b310 100644
--- a/ash/system/power/power_supply_status.cc
+++ b/ash/system/power/power_supply_status.cc
@@ -16,6 +16,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) {}
@@ -40,6 +42,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");
return result;
« no previous file with comments | « ash/system/power/power_supply_status.h ('k') | chromeos/dbus/power_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698