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

Unified Diff: chrome/browser/ui/webui/signin/signin_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/signin/signin_create_profile_handler.cc
diff --git a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
index a9a6524eb4a2b88763c1f0508e5058b2c4615a2e..111de0de2f6e157c7da414e6404f348d4e57edc6 100644
--- a/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
+++ b/chrome/browser/ui/webui/signin/signin_create_profile_handler.cc
@@ -416,8 +416,11 @@ void SigninCreateProfileHandler::ShowProfileCreationError(
GetWebUIListenerName(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);
+ }
profile_creation_type_ = NO_CREATION_IN_PROGRESS;
profile_path_being_created_.clear();
}
@@ -654,7 +657,9 @@ void SigninCreateProfileHandler::CancelProfileRegistration(
// Canceling 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 SigninCreateProfileHandler::RegisterSupervisedUser(
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | chrome/browser/ui/webui/signin/user_manager_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698