Chromium Code Reviews| Index: chrome/browser/profiles/profile_info_cache.cc |
| diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc |
| index 80bfcd9490f97a012742bbec9c9d94041e3b402a..347254da18483498814d158324c918e98627485c 100644 |
| --- a/chrome/browser/profiles/profile_info_cache.cc |
| +++ b/chrome/browser/profiles/profile_info_cache.cc |
| @@ -225,8 +225,12 @@ void ProfileInfoCache::RemoveObserver(ProfileInfoCacheObserver* obs) { |
| } |
| 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(); |
|
sail
2012/05/28 18:45:07
Hm... I don't think this NOTREACHED() is going to
Evan Stade
2012/05/29 18:12:13
this seems safer in case the code ever changes, so
sail
2012/05/29 18:38:21
makes sense!
|
| + return; |
| + } |
| + string16 name = GetNameOfProfileAtIndex(profile_index); |
| FOR_EACH_OBSERVER(ProfileInfoCacheObserver, |
| observer_list_, |