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

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

Issue 8771024: Making profile avatars and names sync. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: updating to rlp's changes and fixing things so unit tests run and pass Created 9 years 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
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);

Powered by Google App Engine
This is Rietveld 408576698