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

Unified Diff: ash/common/system/chromeos/session/tray_session_length_limit.cc

Issue 2715463004: Remove non-MD code from LabelTrayView (Closed)
Patch Set: estade comments Created 3 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/common/system/chromeos/session/tray_session_length_limit.cc
diff --git a/ash/common/system/chromeos/session/tray_session_length_limit.cc b/ash/common/system/chromeos/session/tray_session_length_limit.cc
index 783daf5ab7199a591cf85956aa9a9db4213e821d..b2c243ea7914de67982263fd5810c38557335973 100644
--- a/ash/common/system/chromeos/session/tray_session_length_limit.cc
+++ b/ash/common/system/chromeos/session/tray_session_length_limit.cc
@@ -49,7 +49,7 @@ TraySessionLengthLimit::TraySessionLengthLimit(SystemTray* system_tray)
: SystemTrayItem(system_tray, UMA_SESSION_LENGTH_LIMIT),
limit_state_(LIMIT_NONE),
last_limit_state_(LIMIT_NONE),
- tray_bubble_view_(NULL) {
+ tray_bubble_view_(nullptr) {
Shell::Get()->system_tray_notifier()->AddSessionLengthLimitObserver(this);
Update();
}
@@ -63,17 +63,15 @@ views::View* TraySessionLengthLimit::CreateDefaultView(LoginStatus status) {
CHECK(!tray_bubble_view_);
UpdateState();
if (limit_state_ == LIMIT_NONE)
- return NULL;
- tray_bubble_view_ =
- new LabelTrayView(NULL /* click_listener */,
- IDR_AURA_UBER_TRAY_BUBBLE_SESSION_LENGTH_LIMIT);
+ return nullptr;
+ tray_bubble_view_ = new LabelTrayView(nullptr, kSystemMenuTimerIcon);
tray_bubble_view_->SetMessage(ComposeTrayBubbleMessage());
return tray_bubble_view_;
}
// View has been removed from tray bubble.
void TraySessionLengthLimit::DestroyDefaultView() {
- tray_bubble_view_ = NULL;
+ tray_bubble_view_ = nullptr;
}
void TraySessionLengthLimit::OnSessionStartTimeChanged() {
@@ -157,7 +155,7 @@ void TraySessionLengthLimit::UpdateNotification() {
message_center::NotifierId(
message_center::NotifierId::SYSTEM_COMPONENT,
system_notifier::kNotifierSessionLengthTimeout),
- data, NULL /* delegate */));
+ data, nullptr /* delegate */));
notification->SetSystemPriority();
if (message_center->FindVisibleNotificationById(kNotificationId))
message_center->UpdateNotification(kNotificationId,
« no previous file with comments | « ash/common/system/chromeos/enterprise/tray_enterprise.cc ('k') | ash/common/system/chromeos/supervised/tray_supervised_user.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698