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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 2061593002: Fix crash when switching to a profile that cannot be opened (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug-614753-fix
Patch Set: Move DenyFilePermission to match the place in test_file_util.h Created 4 years, 5 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/safe_browsing/safe_browsing_service.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index ce6cb4def26772497f10c0638b56e37d837d451d..a5fdb281cc2becfc7de484bc3e8fb0e0e9ccee76 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -642,12 +642,12 @@ void SafeBrowsingService::AddPrefService(PrefService* pref_service) {
}
void SafeBrowsingService::RemovePrefService(PrefService* pref_service) {
+ // It is possible to have RemovePrefService called without a prior call to
+ // AddPrefService if profile initialization fails.
if (prefs_map_.find(pref_service) != prefs_map_.end()) {
delete prefs_map_[pref_service];
prefs_map_.erase(pref_service);
RefreshState();
- } else {
- NOTREACHED();
}
}

Powered by Google App Engine
This is Rietveld 408576698