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

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: 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 d3372ffe143bee2f9e498adfb15b405dd7301a4e..44ac976723b8b51c72bf1b5be5b615dc1d0e7a89 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -276,6 +276,15 @@ bool StartupBrowserCreator::LaunchBrowser(
chrome::startup::IsFirstRun is_first_run,
int* return_code) {
+ // If needed, start dowloading the high-res avatar.
+ if (switches::IsNewProfileManagement()) {
+ 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