Index: chrome/browser/ui/webui/options/manage_profile_handler.cc |
=================================================================== |
--- chrome/browser/ui/webui/options/manage_profile_handler.cc (revision 112997) |
+++ chrome/browser/ui/webui/options/manage_profile_handler.cc (working copy) |
@@ -183,9 +183,19 @@ |
if (!args->GetString(2, &icon_url)) |
return; |
+ // Metrics logging variable. |
+ bool previously_using_gaia_icon = |
+ cache.IsUsingGAIANameOfProfileAtIndex(profile_index); |
+ |
size_t new_icon_index; |
if (icon_url == gaia_picture_url_) { |
cache.SetIsUsingGAIAPictureOfProfileAtIndex(profile_index, true); |
+ if (!previously_using_gaia_icon) { |
+ // Only log if they changed to the GAIA photo. |
+ // Selection of GAIA photo as avatar is logged as part of the function |
+ // below. |
+ ProfileMetrics::LogProfileSwitchGaia(ProfileMetrics::GAIA_OPT_IN); |
+ } |
} else if (cache.IsDefaultAvatarIconUrl(icon_url, &new_icon_index)) { |
PrefService* pref_service = profile->GetPrefs(); |
ProfileMetrics::LogProfileAvatarSelection(new_icon_index); |