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

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: roger comments 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
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 28251f08605adeb5c0f303e33f396c85cbcf00e9..07384f4df1e6ed79401737ed539cdf51cc9cbf05 100644
--- a/chrome/browser/profiles/profile_info_cache.h
+++ b/chrome/browser/profiles/profile_info_cache.h
@@ -177,8 +177,15 @@ 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;
+
+ const gfx::Image* 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_;
@@ -187,12 +194,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698