| Index: chrome/browser/profiles/avatar_menu_desktop.cc
|
| diff --git a/chrome/browser/profiles/avatar_menu_desktop.cc b/chrome/browser/profiles/avatar_menu_desktop.cc
|
| index 2f5fcba1f294f9afb4057b5c34e557c8a5e683f1..0abc8870ff86b863210658211e0ed9650c03767c 100644
|
| --- a/chrome/browser/profiles/avatar_menu_desktop.cc
|
| +++ b/chrome/browser/profiles/avatar_menu_desktop.cc
|
| @@ -6,8 +6,9 @@
|
|
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/profiles/profile_attributes_entry.h"
|
| +#include "chrome/browser/profiles/profile_attributes_storage.h"
|
| #include "chrome/browser/profiles/profile_avatar_icon_util.h"
|
| -#include "chrome/browser/profiles/profile_info_cache.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
|
|
| @@ -15,17 +16,17 @@
|
| void AvatarMenu::GetImageForMenuButton(const base::FilePath& profile_path,
|
| gfx::Image* image,
|
| bool* is_rectangle) {
|
| - ProfileInfoCache& cache =
|
| - g_browser_process->profile_manager()->GetProfileInfoCache();
|
| - size_t index = cache.GetIndexOfProfileWithPath(profile_path);
|
| - if (index == std::string::npos) {
|
| + ProfileAttributesStorage& storage =
|
| + g_browser_process->profile_manager()->GetProfileAttributesStorage();
|
| + ProfileAttributesEntry* entry;
|
| + if (!storage.GetProfileAttributesWithPath(profile_path, &entry)) {
|
| NOTREACHED();
|
| return;
|
| }
|
|
|
| // If there is a Gaia image available, try to use that.
|
| - if (cache.IsUsingGAIAPictureOfProfileAtIndex(index)) {
|
| - const gfx::Image* gaia_image = cache.GetGAIAPictureOfProfileAtIndex(index);
|
| + if (entry->IsUsingGAIAPicture()) {
|
| + const gfx::Image* gaia_image = entry->GetGAIAPicture();
|
| if (gaia_image) {
|
| *image = *gaia_image;
|
| *is_rectangle = true;
|
| @@ -34,7 +35,7 @@ void AvatarMenu::GetImageForMenuButton(const base::FilePath& profile_path,
|
| }
|
|
|
| // Otherwise, use the default resource, not the downloaded high-res one.
|
| - const size_t icon_index = cache.GetAvatarIconIndexOfProfileAtIndex(index);
|
| + const size_t icon_index = entry->GetAvatarIconIndex();
|
| const int resource_id =
|
| profiles::GetDefaultAvatarIconResourceIDAtIndex(icon_index);
|
| *image = ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
|
|
|