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

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

Issue 1869473002: Fixed crash on double profile delete operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: param renaming. Created 4 years, 7 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 | « chrome/browser/ui/webui/signin/signin_create_profile_handler.cc ('k') | 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 375dd8c813ad21a0bbfcbe7f9c569205fad0799e..55d5488b25faa3dd5bc8a863d8e96c01f41d994e 100644
--- a/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
+++ b/chrome/browser/ui/webui/signin/user_manager_screen_handler.cc
@@ -463,17 +463,13 @@ void UserManagerScreenHandler::HandleRemoveUser(const base::ListValue* args) {
return;
}
- if (!profiles::IsMultipleProfilesEnabled()) {
- NOTREACHED();
- return;
- }
+ DCHECK(profiles::IsMultipleProfilesEnabled());
// The callback is run if the only profile has been deleted, and a new
// profile has been created to replace it.
- g_browser_process->profile_manager()->ScheduleProfileForDeletion(
- profile_path, base::Bind(&webui::OpenNewWindowForProfile));
- ProfileMetrics::LogProfileDeleteUser(
- ProfileMetrics::DELETE_PROFILE_USER_MANAGER);
+ webui::DeleteProfileAtPath(profile_path,
+ web_ui(),
+ ProfileMetrics::DELETE_PROFILE_USER_MANAGER);
}
void UserManagerScreenHandler::HandleLaunchGuest(const base::ListValue* args) {
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_create_profile_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698