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

Unified Diff: ash/common/system/user/user_view.cc

Issue 2684313004: Additional cleanup of pre-md system menu user row code. (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
« no previous file with comments | « ash/common/system/user/user_view.h ('k') | ash/resources/ash_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/user_view.cc
diff --git a/ash/common/system/user/user_view.cc b/ash/common/system/user/user_view.cc
index c5c238e1159731f02623a14081db69195ecddf3a..7595c0decc0ddd248172327649c744ca250ec2ae 100644
--- a/ash/common/system/user/user_view.cc
+++ b/ash/common/system/user/user_view.cc
@@ -8,7 +8,6 @@
#include <utility>
#include "ash/common/multi_profile_uma.h"
-#include "ash/common/popup_message.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shell_delegate.h"
#include "ash/common/system/tray/system_tray.h"
@@ -237,9 +236,8 @@ UserView::~UserView() {
}
TrayUser::TestState UserView::GetStateForTest() const {
- if (add_menu_option_.get()) {
+ if (add_menu_option_)
return add_user_enabled_ ? TrayUser::ACTIVE : TrayUser::ACTIVE_BUT_DISABLED;
- }
if (!is_user_card_button_)
return TrayUser::SHOWN;
@@ -278,7 +276,7 @@ void UserView::ButtonPressed(views::Button* sender, const ui::Event& event) {
// closed.
owner_->system_tray()->CloseSystemBubble();
}
- } else if (add_menu_option_.get() &&
+ } else if (add_menu_option_ &&
sender->GetWidget() == add_menu_option_.get()) {
RemoveAddUserMenuOption();
// Let the user add another account to the session.
@@ -325,7 +323,7 @@ void UserView::AddUserCard(LoginStatus login) {
}
void UserView::ToggleAddUserMenuOption() {
- if (add_menu_option_.get()) {
+ if (add_menu_option_) {
RemoveAddUserMenuOption();
return;
}
@@ -398,13 +396,12 @@ void UserView::ToggleAddUserMenuOption() {
}
void UserView::RemoveAddUserMenuOption() {
- if (!add_menu_option_.get())
+ if (!add_menu_option_)
return;
focus_manager_->RemoveFocusChangeListener(this);
focus_manager_ = nullptr;
if (user_card_view_->GetFocusManager())
user_card_view_->GetFocusManager()->ClearFocus();
- popup_message_.reset();
add_menu_option_.reset();
}
« no previous file with comments | « ash/common/system/user/user_view.h ('k') | ash/resources/ash_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698