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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 8790010: Adding in metrics for GAIA photo info. Also, fixing avatar logging to only log when the user chan... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « chrome/browser/profiles/profile_metrics.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/profiles/profile_metrics.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698