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

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

Issue 212603011: Newly created profiles should have the grey silhouette as avatar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove duplicate references to resource for grey avatar. Created 6 years, 9 months 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
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index 9338c39e20ad89010d76c53b301a084d10928ff6..b2ece92f27d6a0ec35a4c171cd96af3db3a39bec 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -86,6 +86,7 @@ const int kDefaultAvatarIconResources[] = {
IDR_PROFILE_AVATAR_23,
IDR_PROFILE_AVATAR_24,
IDR_PROFILE_AVATAR_25,
+ IDR_PROFILE_AVATAR_26,
};
const size_t kDefaultAvatarIconsCount = arraysize(kDefaultAvatarIconResources);
@@ -93,6 +94,9 @@ const size_t kDefaultAvatarIconsCount = arraysize(kDefaultAvatarIconResources);
// The first 8 icons are generic.
const size_t kGenericIconCount = 8;
+// The avatar used as a placeholder (grey silhouette).
+const int kPlaceholderAvatarIcon = 26;
+
// First eight are generic icons, which use IDS_NUMBERED_PROFILE_NAME.
const int kDefaultNames[] = {
IDS_DEFAULT_AVATAR_NAME_8,
@@ -112,7 +116,8 @@ const int kDefaultNames[] = {
IDS_DEFAULT_AVATAR_NAME_22,
IDS_DEFAULT_AVATAR_NAME_23,
IDS_DEFAULT_AVATAR_NAME_24,
- IDS_DEFAULT_AVATAR_NAME_25
+ IDS_DEFAULT_AVATAR_NAME_25,
+ IDS_DEFAULT_AVATAR_NAME_26
};
typedef std::vector<unsigned char> ImageData;
@@ -865,6 +870,15 @@ size_t ProfileInfoCache::GetDefaultAvatarIconCount() {
return kDefaultAvatarIconsCount;
}
+
+int ProfileInfoCache::GetPlaceholderAvatarIndex() {
+ return kPlaceholderAvatarIcon;
+}
+
+int ProfileInfoCache::GetPlaceholderAvatarIconResourceID() {
+ return IDR_PROFILE_AVATAR_26;
+}
+
// static
int ProfileInfoCache::GetDefaultAvatarIconResourceIDAtIndex(size_t index) {
DCHECK(IsDefaultAvatarIconIndex(index));

Powered by Google App Engine
This is Rietveld 408576698