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

Unified Diff: ash/system/tiles/tiles_default_view.cc

Issue 2821363002: cros: Disable system tray help/lock buttons during supervised user creation (Closed)
Patch Set: fix browser test Created 3 years, 8 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
« no previous file with comments | « ash/system/tiles/tiles_default_view.h ('k') | ash/system/tiles/tray_tiles.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tiles/tiles_default_view.cc
diff --git a/ash/system/tiles/tiles_default_view.cc b/ash/system/tiles/tiles_default_view.cc
index 216d1b7c43708536c54006dde45196e876674b2c..d5c51a7eef4766fc5a4b277e7cd11d70a17242b1 100644
--- a/ash/system/tiles/tiles_default_view.cc
+++ b/ash/system/tiles/tiles_default_view.cc
@@ -37,15 +37,16 @@ const char kHebrewLocale[] = "he";
namespace ash {
-TilesDefaultView::TilesDefaultView(SystemTrayItem* owner, LoginStatus login)
+TilesDefaultView::TilesDefaultView(SystemTrayItem* owner)
: owner_(owner),
- login_(login),
settings_button_(nullptr),
help_button_(nullptr),
lock_button_(nullptr),
- power_button_(nullptr) {}
+ power_button_(nullptr) {
+ DCHECK(owner_);
+}
-TilesDefaultView::~TilesDefaultView() {}
+TilesDefaultView::~TilesDefaultView() = default;
void TilesDefaultView::Init() {
views::BoxLayout* box_layout =
@@ -59,13 +60,12 @@ void TilesDefaultView::Init() {
// Show the buttons in this row as disabled if the user is at the login
// screen, lock screen, or in a secondary account flow. The exception is
// |power_button_| which is always shown as enabled.
- const bool disable_buttons = !TrayPopupUtils::CanOpenWebUISettings(login_);
+ const bool disable_buttons = !TrayPopupUtils::CanOpenWebUISettings();
settings_button_ = new SystemMenuButton(
this, TrayPopupInkDropStyle::HOST_CENTERED, kSystemMenuSettingsIcon,
IDS_ASH_STATUS_TRAY_SETTINGS);
- if (disable_buttons ||
- !Shell::Get()->session_controller()->ShouldEnableSettings())
+ if (disable_buttons)
settings_button_->SetEnabled(false);
AddChildView(settings_button_);
AddChildView(TrayPopupUtils::CreateVerticalSeparator());
« no previous file with comments | « ash/system/tiles/tiles_default_view.h ('k') | ash/system/tiles/tray_tiles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698