Commit 7846707d authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Remove an ash reference from UserManagerScreenHandler.

This is used for the "manage people" bubble accessible from the avatar
menu. It doesn't compile on Chrome OS so the USE_ASH blocks are
obsolete.

The JS is shared with the Chrome OS login screen, which still uses
kKeyCanRemove, so we can't delete the flag altogether.

Bug: 770866
Change-Id: I55f63800f98e28ebd9358812c3b634b65041a904
Reviewed-on: https://chromium-review.googlesource.com/695944Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505814}
parent c93bdadd
...@@ -69,10 +69,6 @@ ...@@ -69,10 +69,6 @@
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_util.h" #include "ui/gfx/image/image_util.h"
#if defined(USE_ASH)
#include "ash/shell.h" // nogncheck
#endif
namespace { namespace {
// User dictionary keys. // User dictionary keys.
const char kKeyUsername[] = "username"; const char kKeyUsername[] = "username";
...@@ -858,12 +854,6 @@ void UserManagerScreenHandler::SendUserList() { ...@@ -858,12 +854,6 @@ void UserManagerScreenHandler::SendUserList() {
GetAllProfilesAttributesSortedByName(); GetAllProfilesAttributesSortedByName();
user_auth_type_map_.clear(); user_auth_type_map_.clear();
// Profile deletion is not allowed in Metro mode.
bool can_remove = true;
#if defined(USE_ASH)
can_remove = !ash::Shell::HasInstance();
#endif
for (const ProfileAttributesEntry* entry : entries) { for (const ProfileAttributesEntry* entry : entries) {
// Don't show profiles still in the middle of being set up as new legacy // Don't show profiles still in the middle of being set up as new legacy
// supervised users. // supervised users.
...@@ -887,7 +877,7 @@ void UserManagerScreenHandler::SendUserList() { ...@@ -887,7 +877,7 @@ void UserManagerScreenHandler::SendUserList() {
profile_value->SetBoolean(kKeyHasLocalCreds, profile_value->SetBoolean(kKeyHasLocalCreds,
!entry->GetLocalAuthCredentials().empty()); !entry->GetLocalAuthCredentials().empty());
profile_value->SetBoolean(kKeyIsOwner, false); profile_value->SetBoolean(kKeyIsOwner, false);
profile_value->SetBoolean(kKeyCanRemove, can_remove); profile_value->SetBoolean(kKeyCanRemove, true);
profile_value->SetBoolean(kKeyIsDesktop, true); profile_value->SetBoolean(kKeyIsDesktop, true);
profile_value->SetString(kKeyAvatarUrl, GetAvatarImage(entry)); profile_value->SetString(kKeyAvatarUrl, GetAvatarImage(entry));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment