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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 222313005: [Profiles] Download high-res avatars using the --new-profile-management flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typo Created 6 years, 8 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/ui/startup/startup_browser_creator.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc
index c22ed679742335719190f32a5d9f17b1421f2c1c..8d8700e1e4c4255ae429e6a641fff7c079da3bd0 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -272,6 +272,15 @@ bool StartupBrowserCreator::LaunchBrowser(
chrome::startup::IsFirstRun is_first_run,
int* return_code) {
+ // If needed, start downloading the high-res avatar.
msw 2014/04/28 20:46:37 Is this actually needed on browser launch? Is ther
noms (inactive) 2014/04/29 19:12:27 You're right, now that the ProfileInfoCache can cr
+ if (switches::IsNewAvatarMenu()) {
+ ProfileInfoCache& cache =
+ g_browser_process->profile_manager()->GetProfileInfoCache();
+ size_t profile_index = cache.GetIndexOfProfileWithPath(profile->GetPath());
+ size_t icon_index = cache.GetAvatarIconIndexOfProfileAtIndex(profile_index);
+ profiles::DownloadHighResAvatarIfNeeded(icon_index);
+ }
+
in_synchronous_profile_launch_ =
process_startup == chrome::startup::IS_PROCESS_STARTUP;
DCHECK(profile);

Powered by Google App Engine
This is Rietveld 408576698