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

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

Issue 8883030: Making profile avatars and names sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding a Profile Manager unittest 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
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.h ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1816a44642fbf56010160614aa410c8da1cd81ef..073728ac854f30e9275d92925dd05b51ee1c5c09 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -651,17 +651,22 @@ size_t ProfileInfoCache::GetDefaultAvatarIconCount() {
// 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;
+}
+
+// static
bool ProfileInfoCache::IsDefaultAvatarIconUrl(const std::string& url,
size_t* icon_index) {
DCHECK(icon_index);
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.h ('k') | chrome/browser/profiles/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698