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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 1869473002: Fixed crash on double profile delete operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index 892cef085b1ddcf97bb86483a5118f7a82fb74e1..46ee16a6432ffcc28aee1fa9ee50b6ddd6b7a169 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -1374,8 +1374,13 @@ void ProfileManager::FinishDeletingProfile(
profile)->RequestStop(ProfileSyncService::CLEAR_DATA);
}
- ProfileMetrics::LogProfileDelete(cache.ProfileIsAuthenticatedAtIndex(
- cache.GetIndexOfProfileWithPath(profile_dir)));
+ size_t profile_index = cache.GetIndexOfProfileWithPath(profile_dir);
anthonyvd 2016/04/12 17:29:16 Can you use the new ProfileAttributesStorage inter
+ if (profile_index != std::string::npos) {
+ ProfileMetrics::LogProfileDelete(
+ cache.ProfileIsAuthenticatedAtIndex(profile_index));
+ } else {
+ NOTREACHED();
+ }
// Some platforms store passwords in keychains. They should be removed.
scoped_refptr<password_manager::PasswordStore> password_store =
PasswordStoreFactory::GetForProfile(
« 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