| 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_,
|
|
|