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

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

Issue 2715463004: Remove non-MD code from LabelTrayView (Closed)
Patch Set: Created 3 years, 10 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 86b56b5e8d384594db12ed51012e72435b5f9307..57d432d6de295b5ebd424df1060d4edf3fc82d0b 100644
--- a/ash/common/system/chromeos/session/tray_session_length_limit.cc
+++ b/ash/common/system/chromeos/session/tray_session_length_limit.cc
@@ -15,6 +15,7 @@
#include "ash/common/system/tray/system_tray_notifier.h"
#include "ash/common/wm_shell.h"
#include "ash/resources/grit/ash_resources.h"
+#include "ash/resources/vector_icons/vector_icons.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "grit/ash_strings.h"
@@ -47,7 +48,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) {
WmShell::Get()->system_tray_notifier()->AddSessionLengthLimitObserver(this);
Update();
}
@@ -62,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 +156,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,

Powered by Google App Engine
This is Rietveld 408576698