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

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

Issue 102373006: Merge 240486 "Implement the spring charger replacement UI and ad..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1650/src/
Patch Set: Created 7 years 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.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.h
===================================================================
--- ash/system/chromeos/power/tray_power.h (revision 240507)
+++ ash/system/chromeos/power/tray_power.h (working copy)
@@ -48,6 +48,17 @@
private:
friend class TrayPowerTest;
+ // This enum is used for histogram. The existing values should not be removed,
+ // and the new values should be added just before CHARGER_TYPE_COUNT.
+ enum ChargerType{
+ UNKNOWN_CHARGER,
+ MAINS_CHARGER,
+ USB_CHARGER,
+ UNCONFIRMED_SPRING_CHARGER,
+ SAFE_SPRING_CHARGER,
+ CHARGER_TYPE_COUNT,
+ };
+
// Overridden from SystemTrayItem.
virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
@@ -72,6 +83,9 @@
bool UpdateNotificationStateForRemainingTime();
bool UpdateNotificationStateForRemainingPercentage();
+ // Records the charger type in UMA.
+ void RecordChargerType();
+
message_center::MessageCenter* message_center_; // Not owned.
tray::PowerTrayView* power_tray_;
tray::PowerNotificationView* notification_view_;
@@ -81,6 +95,9 @@
// called?
bool usb_charger_was_connected_;
+ // Was line power connected the last time onPowerStatusChanged() was called?
+ bool line_power_was_connected_;
+
DISALLOW_COPY_AND_ASSIGN(TrayPower);
};
« no previous file with comments | « ash/system/chromeos/power/power_status.cc ('k') | ash/system/chromeos/power/tray_power.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698