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

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: Rebase reviewed Created 6 years, 8 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 ad18abe4190ab86864b0db9b4679f9149521fdab..8220ede2a3654c6381734f33fad9805a922e25d7 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -76,7 +76,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;
@@ -395,6 +396,9 @@ const gfx::Image* ProfileInfoCache::GetHighResAvatarOfProfileAtIndex(
int avatar_index = GetAvatarIconIndexOfProfileAtIndex(index);
std::string key = profiles::GetDefaultAvatarIconFileNameAtIndex(avatar_index);
+ if (!strcmp(key.c_str(), profiles::GetNoHighResAvatarFileName()))
+ return NULL;
+
base::FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
base::FilePath image_path = user_data_dir.
« no previous file with comments | « chrome/browser/profiles/profile_avatar_icon_util.cc ('k') | chrome/browser/profiles/profile_list_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698