| Index: chrome/browser/profiles/profiles_state.cc
|
| diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
|
| index 282ffd3f3544b25312ce4518a7be51cf4b0faacf..05c23029b74caaeffb45e59ee8b9ef56d83b0f6a 100644
|
| --- a/chrome/browser/profiles/profiles_state.cc
|
| +++ b/chrome/browser/profiles/profiles_state.cc
|
| @@ -10,6 +10,8 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/profiles/profile_avatar_downloader.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 "chrome/browser/signin/profile_oauth2_token_service_factory.h"
|
| @@ -113,4 +115,14 @@ bool IsRegularOrGuestSession(Browser* browser) {
|
| return profile->IsGuestSession() || !profile->IsOffTheRecord();
|
| }
|
|
|
| +void DownloadHighResAvatarIfNeeded(size_t icon_index) {
|
| + // TODO(noms): We should check whether the file already exists on disk
|
| + // before trying to re-download it. For now, since this is behind a flag and
|
| + // the resources are still changing, re-download it every time the profile
|
| + // avatar changes, to make sure we have the latest copy.
|
| + ProfileInfoCache* cache =
|
| + &g_browser_process->profile_manager()->GetProfileInfoCache();
|
| + cache->DownloadHighResAvatar(icon_index);
|
| +}
|
| +
|
| } // namespace profiles
|
|
|