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

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

Issue 470643002: Add metrics to the new ProfileChooser Tutorials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Browser tests pending Created 6 years, 4 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 4225ac10fba83fc84423013151fe72d7e61187a6..48cca6ea5fde94f6285274530664da6d79bfb426 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -639,6 +639,8 @@ void ProfileChooserView::ShowView(profiles::BubbleViewMode view_to_display,
case profiles::BUBBLE_VIEW_MODE_SWITCH_USER:
layout = CreateSingleColumnLayout(this, kFixedSwitchUserViewWidth);
sub_view = CreateSwitchUserView();
+ ProfileMetrics::LogProfileNewAvatarMenuNotYou(
+ ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_VIEW);
break;
default:
layout = CreateSingleColumnLayout(this, kFixedMenuWidth);
@@ -687,7 +689,11 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
SyncConfirmationUIClosed(false /* configure_sync_first */);
tutorial_mode_ = profiles::TUTORIAL_MODE_NONE;
ShowView(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get());
+ ProfileMetrics::LogProfileNewAvatarMenuSignin(
+ ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_OK);
} else if (sender == tutorial_see_whats_new_button_) {
+ ProfileMetrics::LogProfileNewAvatarMenuUpgrade(
+ ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_WHATS_NEW);
chrome::ShowUserManagerWithTutorial(
profiles::USER_MANAGER_TUTORIAL_OVERVIEW);
} else if (sender == remove_account_button_) {
@@ -713,11 +719,17 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
} else if (sender == signin_current_profile_link_) {
ShowView(profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN, avatar_menu_.get());
} else if (sender == add_person_button_) {
+ ProfileMetrics::LogProfileNewAvatarMenuNotYou(
+ ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_ADD_PERSON);
profiles::ShowUserManagerMaybeWithTutorial(browser_->profile());
} else if (sender == disconnect_button_) {
+ ProfileMetrics::LogProfileNewAvatarMenuNotYou(
+ ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_DISCONNECT);
chrome::ShowSettings(browser_);
} else if (sender == switch_user_cancel_button_) {
ShowView(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get());
+ ProfileMetrics::LogProfileNewAvatarMenuNotYou(
+ ProfileMetrics::PROFILE_AVATAR_MENU_NOT_YOU_BACK);
} else {
// Either one of the "other profiles", or one of the profile accounts
// buttons was pressed.
@@ -776,8 +788,12 @@ void ProfileChooserView::LinkClicked(views::Link* sender, int event_flags) {
LoginUIServiceFactory::GetForProfile(browser_->profile())->
SyncConfirmationUIClosed(true /* configure_sync_first */);
tutorial_mode_ = profiles::TUTORIAL_MODE_NONE;
+ ProfileMetrics::LogProfileNewAvatarMenuSignin(
+ ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_SETTINGS);
} else {
DCHECK(sender == tutorial_not_you_link_);
+ ProfileMetrics::LogProfileNewAvatarMenuUpgrade(
+ ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_NOT_YOU);
ShowView(profiles::BUBBLE_VIEW_MODE_SWITCH_USER, avatar_menu_.get());
}
}
@@ -1407,6 +1423,9 @@ views::View* ProfileChooserView::CreateWelcomeUpgradeTutorialViewIfNeeded(
prefs::kProfileAvatarTutorialShown, show_count + 1);
}
+ ProfileMetrics::LogProfileNewAvatarMenuUpgrade(
+ ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_VIEW);
+
return CreateTutorialView(
profiles::TUTORIAL_MODE_WELCOME_UPGRADE,
l10n_util::GetStringUTF16(
@@ -1421,6 +1440,9 @@ views::View* ProfileChooserView::CreateWelcomeUpgradeTutorialViewIfNeeded(
}
views::View* ProfileChooserView::CreateSigninConfirmationView(){
+ ProfileMetrics::LogProfileNewAvatarMenuSignin(
+ ProfileMetrics::PROFILE_AVATAR_MENU_SIGNIN_VIEW);
+
return CreateTutorialView(
profiles::TUTORIAL_MODE_CONFIRM_SIGNIN,
l10n_util::GetStringUTF16(IDS_PROFILES_CONFIRM_SIGNIN_TUTORIAL_TITLE),
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698