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

Unified Diff: ash/system/user/user_card_view.cc

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback 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/system/user/user_card_view.cc
diff --git a/ash/system/user/user_card_view.cc b/ash/system/user/user_card_view.cc
index 1d956ed9219fe637c1b359e89f5247ee12436c13..6e21bbbef8d4427c2976ec3b11bfd17a884e2a26 100644
--- a/ash/system/user/user_card_view.cc
+++ b/ash/system/user/user_card_view.cc
@@ -10,6 +10,7 @@
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
+#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "ash/system/tray/system_tray_notifier.h"
#include "ash/system/tray/tray_utils.h"
@@ -169,7 +170,7 @@ PublicAccountUserDetails::PublicAccountUserDetails(int max_width)
display_name = kDisplayNameMark[0] + display_name + kDisplayNameMark[0];
// Retrieve the domain managing the device and wrap it with markers.
base::string16 domain = base::UTF8ToUTF16(
- Shell::GetInstance()->system_tray_delegate()->GetEnterpriseDomain());
+ WmShell::Get()->system_tray_delegate()->GetEnterpriseDomain());
base::RemoveChars(domain, kDisplayNameMark, &domain);
base::i18n::WrapStringWithLTRFormatting(&domain);
// Retrieve the label text, inserting the display name and domain.
@@ -274,7 +275,7 @@ void PublicAccountUserDetails::OnPaint(gfx::Canvas* canvas) {
void PublicAccountUserDetails::LinkClicked(views::Link* source,
int event_flags) {
DCHECK_EQ(source, learn_more_);
- Shell::GetInstance()->system_tray_delegate()->ShowPublicAccountInfo();
+ WmShell::Get()->system_tray_delegate()->ShowPublicAccountInfo();
}
void PublicAccountUserDetails::CalculatePreferredSize(int max_allowed_width) {
@@ -381,8 +382,7 @@ void UserCardView::AddUserContent(LoginStatus login_status, int user_index) {
views::Label* user_email = NULL;
if (login_status != LoginStatus::GUEST) {
- SystemTrayDelegate* tray_delegate =
- Shell::GetInstance()->system_tray_delegate();
+ SystemTrayDelegate* tray_delegate = WmShell::Get()->system_tray_delegate();
base::string16 user_email_string =
tray_delegate->IsUserSupervised()
? l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SUPERVISED_LABEL)

Powered by Google App Engine
This is Rietveld 408576698