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

Unified Diff: ash/system/power/tray_power.cc

Issue 9983002: Pass correct initial/user values when requesting power status (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
Index: ash/system/power/tray_power.cc
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index 8419dbca7f70c155ba1b5eaf72286fe316bed979..558edef8d2295bce54d1b840641314f3f3e53555 100644
--- a/ash/system/power/tray_power.cc
+++ b/ash/system/power/tray_power.cc
@@ -164,7 +164,8 @@ views::View* TrayPower::CreateTrayView(user::LoginStatus status) {
// there is a battery or not. So always create this, and adjust visibility as
// necessary.
PowerSupplyStatus power_status =
- ash::Shell::GetInstance()->tray_delegate()->GetPowerSupplyStatus();
+ ash::Shell::GetInstance()->tray_delegate()->GetPowerSupplyStatus(
+ SystemTrayDelegate::UPDATE_INITIAL);
power_tray_.reset(new tray::PowerTrayView());
power_tray_->UpdatePowerStatus(power_status);
return power_tray_.get();
@@ -185,7 +186,8 @@ views::View* TrayPower::CreateDefaultView(user::LoginStatus status) {
container->AddChildView(date_.get());
PowerSupplyStatus power_status =
- ash::Shell::GetInstance()->tray_delegate()->GetPowerSupplyStatus();
+ ash::Shell::GetInstance()->tray_delegate()->GetPowerSupplyStatus(
+ SystemTrayDelegate::UPDATE_USER);
sadrul 2012/04/10 00:01:34 It probably makes sense to remove the call to Requ
stevenjb 2012/04/10 18:02:03 That makes sense. Done.
if (power_status.battery_is_present) {
power_.reset(new tray::PowerPopupView());
power_->UpdatePowerStatus(power_status);

Powered by Google App Engine
This is Rietveld 408576698