Chromium Code Reviews| Index: chrome/browser/profiles/profile_info_cache.cc |
| =================================================================== |
| --- chrome/browser/profiles/profile_info_cache.cc (revision 112723) |
| +++ chrome/browser/profiles/profile_info_cache.cc (working copy) |
| @@ -618,17 +618,22 @@ |
| // static |
| int ProfileInfoCache::GetDefaultAvatarIconResourceIDAtIndex(size_t index) { |
| - DCHECK_LT(index, GetDefaultAvatarIconCount()); |
| + DCHECK(IsDefaultAvatarIconIndex(index)); |
| return kDefaultAvatarIconResources[index]; |
| } |
| // static |
| std::string ProfileInfoCache::GetDefaultAvatarIconUrl(size_t index) { |
| - DCHECK_LT(index, kDefaultAvatarIconsCount); |
| + DCHECK(IsDefaultAvatarIconIndex(index)); |
| return StringPrintf("%s%" PRIuS, kDefaultUrlPrefix, index); |
| } |
| // static |
| +bool ProfileInfoCache::IsDefaultAvatarIconIndex(size_t index) { |
| + return index<kDefaultAvatarIconsCount; |
|
sail
2011/12/02 19:07:10
space before and after "<"
jwd
2011/12/02 21:10:16
Done.
|
| +} |
| + |
| +// static |
| bool ProfileInfoCache::IsDefaultAvatarIconUrl(const std::string& url, |
| size_t* icon_index) { |
| DCHECK(icon_index); |