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

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

Issue 210043005: [Profiles] Use high resolution avatars if they exist (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.h
diff --git a/chrome/browser/profiles/profile_info_cache.h b/chrome/browser/profiles/profile_info_cache.h
index 42a0222eaa855a42e443dd0ef6936e7ff8cd1eb9..65d210182360c631f70c03d52fbeb7b7946d77bf 100644
--- a/chrome/browser/profiles/profile_info_cache.h
+++ b/chrome/browser/profiles/profile_info_cache.h
@@ -189,8 +189,14 @@ class ProfileInfoCache : public ProfileInfoInterface,
// of profiles is still sorted.
void UpdateSortForProfileIndex(size_t index);
- void OnGAIAPictureLoaded(const base::FilePath& path,
- gfx::Image** image) const;
+ // Loads or uses an already loaded high resolution image of the
+ // generic profile avatar.
+ const gfx::Image* GetHighResAvatarOfProfileAtIndex(size_t index) const;
+
+ void LoadAvatarPictureFromPath(const std::string& key,
+ const base::FilePath& image_path) const;
+ void OnAvatarPictureLoaded(const std::string& key,
+ gfx::Image** image) const;
void OnGAIAPictureSaved(const base::FilePath& path, bool* success) const;
PrefService* prefs_;
@@ -199,12 +205,12 @@ class ProfileInfoCache : public ProfileInfoInterface,
ObserverList<ProfileInfoCacheObserver> observer_list_;
- // A cache of gaia profile pictures. This cache is updated lazily so it needs
- // to be mutable.
- mutable std::map<std::string, gfx::Image*> gaia_pictures_;
- // Marks a gaia profile picture as loading. This prevents a picture from
+ // A cache of gaia/high res avatar profile pictures. This cache is updated
+ // lazily so it needs to be mutable.
+ mutable std::map<std::string, gfx::Image*> cached_avatar_images_;
+ // Marks a profile picture as loading. This prevents a picture from
// loading multiple times.
- mutable std::map<std::string, bool> gaia_pictures_loading_;
+ mutable std::map<std::string, bool> cached_avatar_images_loading_;
DISALLOW_COPY_AND_ASSIGN(ProfileInfoCache);
};
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_cache.cc » ('j') | chrome/browser/profiles/profile_info_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698