diff options
author | antrim@chromium.org <antrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-26 16:47:28 +0000 |
---|---|---|
committer | antrim@chromium.org <antrim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-26 16:47:28 +0000 |
commit | 6806af3335c9ed84b8ffcfb4211c46f32b174146 (patch) | |
tree | 03e8e03beb9a547f6d247a1b6853af66c4f29341 /ash | |
parent | 59a819cec1322b633562d46247e3c78271460a88 (diff) | |
download | chromium_src-6806af3335c9ed84b8ffcfb4211c46f32b174146.zip chromium_src-6806af3335c9ed84b8ffcfb4211c46f32b174146.tar.gz chromium_src-6806af3335c9ed84b8ffcfb4211c46f32b174146.tar.bz2 |
Remove notification upon unlock
BUG=253639
R=derat@chromium.org
Review URL: https://chromiumcodereview.appspot.com/17883002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208716 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/system/chromeos/managed/tray_locally_managed_user.cc | 10 | ||||
-rw-r--r-- | ash/system/chromeos/managed/tray_locally_managed_user.h | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ash/system/chromeos/managed/tray_locally_managed_user.cc b/ash/system/chromeos/managed/tray_locally_managed_user.cc index 1803bea..61e422d 100644 --- a/ash/system/chromeos/managed/tray_locally_managed_user.cc +++ b/ash/system/chromeos/managed/tray_locally_managed_user.cc @@ -49,7 +49,8 @@ class ManagedUserNotificationView : public TrayNotificationView { TrayLocallyManagedUser::TrayLocallyManagedUser(SystemTray* system_tray) : SystemTrayItem(system_tray), tray_view_(NULL), - notification_view_(NULL) { + notification_view_(NULL), + status_(ash::user::LOGGED_IN_NONE) { } TrayLocallyManagedUser::~TrayLocallyManagedUser() { @@ -98,8 +99,13 @@ void TrayLocallyManagedUser::OnViewClicked(views::View* sender) { void TrayLocallyManagedUser::UpdateAfterLoginStatusChange( user::LoginStatus status) { - if (status == ash::user::LOGGED_IN_LOCALLY_MANAGED) + if (status == status_) + return; + if (status == ash::user::LOGGED_IN_LOCALLY_MANAGED && + status_ != ash::user::LOGGED_IN_LOCKED) { ShowNotificationView(); + } + status_ = status; } } // namespace internal diff --git a/ash/system/chromeos/managed/tray_locally_managed_user.h b/ash/system/chromeos/managed/tray_locally_managed_user.h index fb85c31..eda2be0 100644 --- a/ash/system/chromeos/managed/tray_locally_managed_user.h +++ b/ash/system/chromeos/managed/tray_locally_managed_user.h @@ -41,6 +41,8 @@ class TrayLocallyManagedUser : public SystemTrayItem, private: LabelTrayView* tray_view_; views::View* notification_view_; + // Previous login status to avoid showing notification upon unlock. + user::LoginStatus status_; DISALLOW_COPY_AND_ASSIGN(TrayLocallyManagedUser); }; |