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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 227083007: UMA for New Profile Management. Track User-Menu Tutorial actions with Histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index 7d6d5490fcbebbd443223e616fed0c4de9c899d8..b23fffbbc217f4abe2e12d2ed6f3086ac77b0173 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/pref_service_flags_storage.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
@@ -527,6 +528,8 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
// is indeed shown for the maximum number of times.
browser_->profile()->GetPrefs()->SetInteger(
prefs::kProfileAvatarTutorialShown, kProfileAvatarTutorialShowMax + 1);
+
+ ProfileMetrics::LogProfileMirrorEnrollment(ProfileMetrics::PROMO_DISMISS);
guohui 2014/04/16 15:47:45 this dismisses the confirmation tutorial, not the
Mike Lerman 2014/04/24 15:14:16 Done.
ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get());
} else if (sender == tutorial_enable_new_profile_management_button_) {
EnableNewProfileManagementPreview();
@@ -584,6 +587,7 @@ void ProfileChooserView::LinkClicked(views::Link* sender, int event_flags) {
ShowView(BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT, avatar_menu_.get());
} else if (sender == tutorial_learn_more_link_) {
// TODO(guohui): update |learn_more_url| once it is decided.
+ ProfileMetrics::LogProfileMirrorEnrollment(ProfileMetrics::PROMO_ACCEPT);
guohui 2014/04/16 15:47:45 the link opens the learn more url, it dose not mea
Mike Lerman 2014/04/24 15:14:16 Renamed. Done.
const GURL lear_more_url("https://support.google.com/chrome/?hl=en#to");
chrome::NavigateParams params(
browser_->profile(),
@@ -663,6 +667,9 @@ views::View* ProfileChooserView::CreateProfileChooserView(
}
if (tutorial_view) {
+ // Be sure not to track the tutorial display on View refresh.
+ if (tutorial_shown == FALSE)
+ ProfileMetrics::LogProfileMirrorEnrollment(ProfileMetrics::PROMO_DISPLAY);
guohui 2014/04/16 15:47:45 we have two different tutorials at the moment, one
Mike Lerman 2014/04/24 15:14:16 Done.
layout->StartRow(1, 0);
layout->AddView(tutorial_view);
}

Powered by Google App Engine
This is Rietveld 408576698