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

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

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/common/system/chromeos/power/tray_power.cc
diff --git a/ash/common/system/chromeos/power/tray_power.cc b/ash/common/system/chromeos/power/tray_power.cc
index e1f8c1f9e1dc8644a1330956e017870fa2855d17..21f44f9748b986668e42720c2f1799965665344f 100644
--- a/ash/common/system/chromeos/power/tray_power.cc
+++ b/ash/common/system/chromeos/power/tray_power.cc
@@ -92,9 +92,7 @@ namespace tray {
// This view is used only for the tray.
class PowerTrayView : public views::ImageView {
public:
- PowerTrayView() {
- UpdateImage();
- }
+ PowerTrayView() { UpdateImage(); }
~PowerTrayView() override {}
@@ -180,8 +178,7 @@ void TrayPower::DestroyTrayView() {
power_tray_ = NULL;
}
-void TrayPower::DestroyDefaultView() {
-}
+void TrayPower::DestroyDefaultView() {}
void TrayPower::UpdateAfterLoginStatusChange(LoginStatus status) {}
@@ -266,16 +263,15 @@ void TrayPower::MaybeShowDualRoleNotification() {
bool TrayPower::UpdateNotificationState() {
const PowerStatus& status = *PowerStatus::Get();
- if (!status.IsBatteryPresent() ||
- status.IsBatteryTimeBeingCalculated() ||
+ if (!status.IsBatteryPresent() || status.IsBatteryTimeBeingCalculated() ||
status.IsMainsChargerConnected()) {
notification_state_ = NOTIFICATION_NONE;
return false;
}
- return status.IsUsbChargerConnected() ?
- UpdateNotificationStateForRemainingPercentage() :
- UpdateNotificationStateForRemainingTime();
+ return status.IsUsbChargerConnected()
+ ? UpdateNotificationStateForRemainingPercentage()
+ : UpdateNotificationStateForRemainingTime();
}
bool TrayPower::UpdateNotificationStateForRemainingTime() {
« no previous file with comments | « ash/common/system/chromeos/power/tray_power.h ('k') | ash/common/system/chromeos/power/tray_power_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698