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

Unified Diff: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc

Issue 2046783002: Allow deletion of profiles in the old user manager when all profiles are locked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
diff --git a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
index 8730ea4af700b62c7a1fc835f2284c2a91f655de..f25bbcf771ffbcd59847e8adb5f69dc79ec0505f 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -49,6 +49,7 @@
#include "components/prefs/pref_service.h"
#include "components/proximity_auth/screenlock_bridge.h"
#include "components/signin/core/account_id/account_id.h"
+#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
@@ -469,9 +470,11 @@ void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) {
DCHECK(profiles::IsMultipleProfilesEnabled());
- if (profiles::AreAllProfilesLocked()) {
+ if (switches::IsMaterialDesignUserManager() &&
+ profiles::AreAllProfilesLocked()) {
web_ui()->CallJavascriptFunctionUnsafe(
- "cr.webUIListenerCallback", base::StringValue("show-error-dialog"),
+ "cr.webUIListenerCallback",
+ base::StringValue("show-error-dialog"),
base::StringValue(l10n_util::GetStringUTF8(
IDS_USER_MANAGER_REMOVE_PROFILE_PROFILES_LOCKED_ERROR)));
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698