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 a4feda38d01797a05657cac1f0574e7e8936dd3c..c65cb8e06779f8b2ae11c801237500e3bfdc57d8 100644 |
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/profiles/profile_avatar_icon_util.h" |
#include "chrome/browser/profiles/profile_info_cache.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" |
@@ -525,9 +526,14 @@ 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::ENROLL_CLOSE_PROMO_CARD); |
ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); |
} else if (sender == tutorial_enable_new_profile_management_button_) { |
profiles::EnableNewProfileManagementPreview(); |
+ ProfileMetrics:: |
+ LogProfileMirrorEnrollment(ProfileMetrics::ENROLL_ACCEPT_MIRROR); |
} else if (sender == remove_account_and_relaunch_button_) { |
RemoveAccount(); |
} else if (sender == account_removal_cancel_button_) { |
@@ -582,6 +588,8 @@ 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::ENROLL_LAUNCH_TUTORIAL); |
const GURL lear_more_url("https://support.google.com/chrome/?hl=en#to"); |
chrome::NavigateParams params( |
browser_->profile(), |
@@ -661,6 +669,12 @@ views::View* ProfileChooserView::CreateProfileChooserView( |
} |
if (tutorial_view) { |
+ // Be sure not to track the tutorial display on View refresh, and only count |
+ // the preview-promo view, not the welcome-enabled view. |
+ if (tutorial_shown == FALSE && !switches::IsNewProfileManagement()) { |
guohui
2014/04/25 14:46:50
Currently tutorial_shown only tracks the welcome-e
Mike Lerman
2014/04/28 14:53:11
Ok. I had put in the condition on tutorial_shown b
|
+ ProfileMetrics:: |
+ LogProfileMirrorEnrollment(ProfileMetrics::ENROLL_DISPLAY); |
+ } |
layout->StartRow(1, 0); |
layout->AddView(tutorial_view); |
} |
@@ -749,7 +763,7 @@ views::View* ProfileChooserView::CreateTutorialView( |
title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
title_label->SetAutoColorReadabilityEnabled(false); |
title_label->SetEnabledColor(SK_ColorWHITE); |
- title_label ->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList( |
+ title_label->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList( |
ui::ResourceBundle::MediumFont)); |
layout->StartRow(1, 0); |
layout->AddView(title_label); |