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

Unified Diff: chrome/browser/ui/webui/options/create_profile_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
Index: chrome/browser/ui/webui/options/create_profile_handler.cc
diff --git a/chrome/browser/ui/webui/options/create_profile_handler.cc b/chrome/browser/ui/webui/options/create_profile_handler.cc
index 6c74891513c9f67b8ab383ab3acdfe5ce9bb45b3..85aebd77c301d581cadbca460a58f2a568f242d4 100644
--- a/chrome/browser/ui/webui/options/create_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/create_profile_handler.cc
@@ -232,8 +232,11 @@ void CreateProfileHandler::ShowProfileCreationError(
GetJavascriptMethodName(PROFILE_CREATION_ERROR),
base::StringValue(error));
// The ProfileManager calls us back with a NULL profile in some cases.
- if (profile)
- webui::DeleteProfileAtPath(profile->GetPath(), web_ui());
+ if (profile) {
+ webui::DeleteProfileAtPath(profile->GetPath(),
+ web_ui(),
+ ProfileMetrics::DELETE_PROFILE_SETTINGS);
+ }
}
void CreateProfileHandler::RecordProfileCreationMetrics(
@@ -374,7 +377,9 @@ void CreateProfileHandler::CancelProfileRegistration(bool user_initiated) {
// Cancelling registration means the callback passed into
// RegisterAndInitSync() won't be called, so the cleanup must be done here.
profile_path_being_created_.clear();
- webui::DeleteProfileAtPath(new_profile->GetPath(), web_ui());
+ webui::DeleteProfileAtPath(new_profile->GetPath(),
+ web_ui(),
+ ProfileMetrics::DELETE_PROFILE_SETTINGS);
}
void CreateProfileHandler::RegisterSupervisedUser(
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/browser/ui/webui/options/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698