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

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

Issue 148463011: Merge 247397 "chromeos: Avoid notification for original Spring c..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 11 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/chromeos/power/power_status.cc ('k') | ash/system/chromeos/power/tray_power_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/power/tray_power.cc
===================================================================
--- ash/system/chromeos/power/tray_power.cc (revision 247460)
+++ ash/system/chromeos/power/tray_power.cc (working copy)
@@ -233,7 +233,8 @@
const PowerStatus& status = *PowerStatus::Get();
if (!status.IsBatteryPresent() ||
status.IsBatteryTimeBeingCalculated() ||
- status.IsMainsChargerConnected()) {
+ status.IsMainsChargerConnected() ||
+ status.IsOriginalSpringChargerConnected()) {
notification_state_ = NOTIFICATION_NONE;
return false;
}
@@ -249,7 +250,8 @@
const int remaining_minutes = static_cast<int>(
PowerStatus::Get()->GetBatteryTimeToEmpty().InSecondsF() / 60.0 + 0.5);
- if (remaining_minutes >= kNoWarningMinutes) {
+ if (remaining_minutes >= kNoWarningMinutes ||
+ PowerStatus::Get()->IsBatteryFull()) {
notification_state_ = NOTIFICATION_NONE;
return false;
}
@@ -284,7 +286,8 @@
const int remaining_percentage =
PowerStatus::Get()->GetRoundedBatteryPercent();
- if (remaining_percentage >= kNoWarningPercentage) {
+ if (remaining_percentage >= kNoWarningPercentage ||
+ PowerStatus::Get()->IsBatteryFull()) {
notification_state_ = NOTIFICATION_NONE;
return false;
}
« no previous file with comments | « ash/system/chromeos/power/power_status.cc ('k') | ash/system/chromeos/power/tray_power_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698