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

Side by Side Diff: ash/common/system/chromeos/power/tray_power.cc

Issue 2162153002: Added Ash.SystemMenu.DefaultView.VisibleItems histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the COUNT value from the SystemMenuDefaultViewRows enum. Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/chromeos/power/tray_power.h" 5 #include "ash/common/system/chromeos/power/tray_power.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/accessibility_delegate.h" 9 #include "ash/common/accessibility_delegate.h"
10 #include "ash/common/ash_switches.h" 10 #include "ash/common/ash_switches.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 const int TrayPower::kCriticalMinutes = 5; 136 const int TrayPower::kCriticalMinutes = 5;
137 const int TrayPower::kLowPowerMinutes = 15; 137 const int TrayPower::kLowPowerMinutes = 15;
138 const int TrayPower::kNoWarningMinutes = 30; 138 const int TrayPower::kNoWarningMinutes = 30;
139 const int TrayPower::kCriticalPercentage = 5; 139 const int TrayPower::kCriticalPercentage = 5;
140 const int TrayPower::kLowPowerPercentage = 10; 140 const int TrayPower::kLowPowerPercentage = 10;
141 const int TrayPower::kNoWarningPercentage = 15; 141 const int TrayPower::kNoWarningPercentage = 15;
142 142
143 const char TrayPower::kUsbNotificationId[] = "usb-charger"; 143 const char TrayPower::kUsbNotificationId[] = "usb-charger";
144 144
145 TrayPower::TrayPower(SystemTray* system_tray, MessageCenter* message_center) 145 TrayPower::TrayPower(SystemTray* system_tray, MessageCenter* message_center)
146 : SystemTrayItem(system_tray), 146 : SystemTrayItem(system_tray, UMA_POWER),
147 message_center_(message_center), 147 message_center_(message_center),
148 power_tray_(NULL), 148 power_tray_(NULL),
149 notification_state_(NOTIFICATION_NONE), 149 notification_state_(NOTIFICATION_NONE),
150 usb_charger_was_connected_(false), 150 usb_charger_was_connected_(false),
151 line_power_was_connected_(false), 151 line_power_was_connected_(false),
152 usb_notification_dismissed_(false) { 152 usb_notification_dismissed_(false) {
153 PowerStatus::Get()->AddObserver(this); 153 PowerStatus::Get()->AddObserver(this);
154 } 154 }
155 155
156 TrayPower::~TrayPower() { 156 TrayPower::~TrayPower() {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 NOTREACHED(); 351 NOTREACHED();
352 return false; 352 return false;
353 } 353 }
354 354
355 void TrayPower::NotifyUsbNotificationClosedByUser() { 355 void TrayPower::NotifyUsbNotificationClosedByUser() {
356 usb_notification_dismissed_ = true; 356 usb_notification_dismissed_ = true;
357 } 357 }
358 358
359 } // namespace ash 359 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_vpn.cc ('k') | ash/common/system/chromeos/screen_security/screen_capture_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698