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

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

Issue 10521018: Merge 139419 - fix crash when double-deleting a profile (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 years, 6 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 | chrome/browser/resources/options2/browser_options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_cache.cc
===================================================================
--- chrome/browser/profiles/profile_info_cache.cc (revision 140460)
+++ chrome/browser/profiles/profile_info_cache.cc (working copy)
@@ -225,8 +225,12 @@
}
void ProfileInfoCache::DeleteProfileFromCache(const FilePath& profile_path) {
- string16 name = GetNameOfProfileAtIndex(
- GetIndexOfProfileWithPath(profile_path));
+ size_t profile_index = GetIndexOfProfileWithPath(profile_path);
+ if (profile_index == std::string::npos) {
+ NOTREACHED();
+ return;
+ }
+ string16 name = GetNameOfProfileAtIndex(profile_index);
FOR_EACH_OBSERVER(ProfileInfoCacheObserver,
observer_list_,
« no previous file with comments | « no previous file | chrome/browser/resources/options2/browser_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698