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

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

Issue 14139003: Chrome OS multi-profiles backend and UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hacks: reference issues Created 7 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
Index: ash/system/user/tray_user.cc
diff --git a/ash/system/user/tray_user.cc b/ash/system/user/tray_user.cc
index 03e845777dacd3d46d2360b84ed42bc026602d28..f9560d4918a711b0cbf67b25534afb41a67c85eb 100644
--- a/ash/system/user/tray_user.cc
+++ b/ash/system/user/tray_user.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "ash/shell.h"
+#include "ash/shell_delegate.h"
#include "ash/system/tray/system_tray.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
@@ -465,12 +466,16 @@ void UserView::Layout() {
}
void UserView::ButtonPressed(views::Button* sender, const ui::Event& event) {
- if (sender == logout_button_)
+ if (sender == logout_button_) {
ash::Shell::GetInstance()->system_tray_delegate()->SignOut();
- else if (sender == profile_picture_)
- ash::Shell::GetInstance()->system_tray_delegate()->ChangeProfilePicture();
- else
+ } else if (sender == profile_picture_) {
+ if (ash::Shell::GetInstance()->delegate()->IsMultiProfilesEnabled())
+ ash::Shell::GetInstance()->system_tray_delegate()->ShowUserLogin();
+ else
+ ash::Shell::GetInstance()->system_tray_delegate()->ChangeProfilePicture();
+ } else {
NOTREACHED();
+ }
}
void UserView::AddLogoutButton(ash::user::LoginStatus login) {

Powered by Google App Engine
This is Rietveld 408576698