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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.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/webui/options/manage_profile_handler.cc
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index 2030d17c8d8af32c12d942d575bc75746b2c4a9c..745f145c802dea715c04dd037895a7085f7ac543 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -31,6 +31,7 @@
#include "chrome/browser/ui/webui/options/options_handlers_helper.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
+#include "chrome/common/profile_management_switches.h"
#include "chrome/common/url_constants.h"
#include "components/signin/core/browser/signin_manager.h"
#include "content/public/browser/browser_thread.h"
@@ -323,6 +324,11 @@ void ManageProfileHandler::SetProfileIconAndName(const base::ListValue* args) {
}
} else if (profiles::IsDefaultAvatarIconUrl(icon_url, &new_icon_index)) {
ProfileMetrics::LogProfileAvatarSelection(new_icon_index);
+
+ if (switches::IsNewProfileManagement()) {
+ profiles::DownloadHighResAvatarIfNeeded(new_icon_index);
+ }
+
PrefService* pref_service = profile->GetPrefs();
// Updating the profile preference will cause the cache to be updated for
// this preference.

Powered by Google App Engine
This is Rietveld 408576698