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

Unified Diff: chrome/browser/ui/webui/profile_helper.cc

Issue 1869473002: Fixed crash on double profile delete operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fixes. 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/profile_helper.h ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/profile_helper.cc
diff --git a/chrome/browser/ui/webui/profile_helper.cc b/chrome/browser/ui/webui/profile_helper.cc
index f350b962f1c9a8c56524d20225f3292814038455..8e5be511a7b7c2519cc58d235208c8d63ef51b76 100644
--- a/chrome/browser/ui/webui/profile_helper.cc
+++ b/chrome/browser/ui/webui/profile_helper.cc
@@ -26,16 +26,15 @@ void OpenNewWindowForProfile(Profile* profile, Profile::CreateStatus status) {
chrome::startup::IS_FIRST_RUN, false);
}
-void DeleteProfileAtPath(base::FilePath file_path, content::WebUI* web_ui) {
+void DeleteProfileAtPath(base::FilePath file_path,
+ content::WebUI* web_ui,
+ ProfileMetrics::ProfileDelete user) {
Mike Lerman 2016/05/13 13:21:32 nit: user's not the best name for the variable. Th
DCHECK(web_ui);
if (!profiles::IsMultipleProfilesEnabled())
return;
-
- ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::DELETE_PROFILE_SETTINGS);
-
- g_browser_process->profile_manager()->ScheduleProfileForDeletion(
- file_path, base::Bind(&OpenNewWindowForProfile));
+ g_browser_process->profile_manager()->MaybeScheduleProfileForDeletion(
+ file_path, base::Bind(&OpenNewWindowForProfile), user);
}
} // namespace webui
« no previous file with comments | « chrome/browser/ui/webui/profile_helper.h ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698