| 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 4a71e0241bcbee7aa1392ac1a059a5ccc6f984b9..15be2f3675be7253f182798bbcbbef535d1748a7 100644
|
| --- a/chrome/browser/profiles/profile_info_cache.cc
|
| +++ b/chrome/browser/profiles/profile_info_cache.cc
|
| @@ -29,7 +29,7 @@ const int kDefaultAvatarIconResources[] = {
|
| IDR_PROFILE_AVATAR_3,
|
| };
|
|
|
| -const int kDefaultAvatarIconsCount = arraysize(kDefaultAvatarIconResources);
|
| +const size_t kDefaultAvatarIconsCount = arraysize(kDefaultAvatarIconResources);
|
|
|
| // Checks if the given URL points to one of the default avatar icons. if it is,
|
| // returns true and its index through |icon_index|. If not, returns false.
|
| @@ -42,7 +42,8 @@ bool IsDefaultAvatarIconUrl(const std::string& url, size_t* icon_index) {
|
| if (base::StringToInt(url.begin() + strlen(kDefaultUrlPrefix),
|
| url.end(),
|
| &int_value)) {
|
| - if (int_value < 0 || int_value >= kDefaultAvatarIconsCount)
|
| + if (int_value < 0 ||
|
| + int_value >= static_cast<int>(kDefaultAvatarIconsCount))
|
| return false;
|
| *icon_index = int_value;
|
| return true;
|
| @@ -164,6 +165,11 @@ int ProfileInfoCache::GetDefaultAvatarIconResourceIDAtIndex(size_t index) {
|
| return kDefaultAvatarIconResources[index];
|
| }
|
|
|
| +std::string ProfileInfoCache::GetDefaultAvatarIconUrl(size_t index) {
|
| + DCHECK_LT(index, kDefaultAvatarIconsCount);
|
| + return StringPrintf("%s%zu", kDefaultUrlPrefix, index);
|
| +}
|
| +
|
| const DictionaryValue* ProfileInfoCache::GetInfoForProfileAtIndex(
|
| size_t index) const {
|
| DCHECK_LT(index, GetNumberOfProfiles());
|
|
|