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

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

Issue 861053004: [Profiles] Send out less profile avatar related notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mike nit Created 5 years, 11 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 d38fca1d17875d29ee5d570dcdfb9cad012e0f1b..57fdc23fc61300cd20ea7f33c346cdae711c33ac 100644
--- a/chrome/browser/profiles/profile_info_cache.h
+++ b/chrome/browser/profiles/profile_info_cache.h
@@ -136,10 +136,10 @@ class ProfileInfoCache : public ProfileInfoInterface,
// Register cache related preferences in Local State.
static void RegisterPrefs(PrefRegistrySimple* registry);
- // Starts downloading the high res avatar at index |icon_index| for profile
- // with path |profile_path|.
- void DownloadHighResAvatar(size_t icon_index,
- const base::FilePath& profile_path);
+ // Checks whether the high res avatar at index |icon_index| exists, and
+ // if it does not, calls |DownloadHighResAvatar|.
+ void DownloadHighResAvatarIfNeeded(size_t icon_index,
+ const base::FilePath& profile_path);
// Saves the avatar |image| at |image_path|. This is used both for the
// GAIA profile pictures and the ProfileAvatarDownloader that is used to
@@ -184,6 +184,11 @@ class ProfileInfoCache : public ProfileInfoInterface,
// generic profile avatar.
const gfx::Image* GetHighResAvatarOfProfileAtIndex(size_t index) const;
+ // Starts downloading the high res avatar at index |icon_index| for profile
+ // with path |profile_path|.
+ void DownloadHighResAvatar(size_t icon_index,
+ const base::FilePath& profile_path);
+
// Returns the decoded image at |image_path|. Used both by the GAIA profile
// image and the high res avatars.
const gfx::Image* LoadAvatarPictureFromPath(
« 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