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

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

Issue 288493008: UMA Metrics for the user menu, including vasquette-detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change histogram bucket order for maintainability. Created 6 years, 7 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 66a55719ec94ddaab18f3f6e8c1ae232c26d8318..1b4877bb64d2053311fe33aaa6955152ff724c6f 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -418,8 +418,11 @@ ProfileChooserView::ProfileChooserView(views::View* anchor_view,
BubbleViewMode view_mode)
: BubbleDelegateView(anchor_view, arrow),
browser_(browser),
- view_mode_(view_mode),
- tutorial_mode_(TUTORIAL_MODE_NONE) {
+ tutorial_mode_(TUTORIAL_MODE_NONE),
+ view_mode_(view_mode == BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT_FROM_GAIA ?
+ BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT : view_mode),
+ opened_from_gaia_(
+ view_mode == BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT_FROM_GAIA) {
// Reset the default margins inherited from the BubbleDelegateView.
set_margins(gfx::Insets());
@@ -565,6 +568,8 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
if (browser_->profile()->IsGuestSession())
profiles::CloseGuestProfileWindows();
} else if (sender == lock_button_) {
+ ProfileMetrics::LogProfileDesktopSignout(
+ ProfileMetrics::PROFILE_DESKTOP_MENU_LOCK, opened_from_gaia_);
profiles::LockProfile(browser_->profile());
} else if (sender == tutorial_ok_button_) {
// If the user manually dismissed the tutorial, never show it again by
@@ -625,6 +630,9 @@ void ProfileChooserView::ButtonPressed(views::Button* sender,
ProfileMetrics::SWITCH_PROFILE_ICON);
} else {
// This was a profile accounts button.
+ ProfileMetrics::LogProfileDesktopSignout(
+ ProfileMetrics::PROFILE_DESKTOP_MENU_REMOVE_ACCT,
+ opened_from_gaia_);
AccountButtonIndexes::const_iterator account_match =
current_profile_accounts_map_.find(sender);
DCHECK(account_match != current_profile_accounts_map_.end());
@@ -657,6 +665,8 @@ void ProfileChooserView::LinkClicked(views::Link* sender, int event_flags) {
BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT,
avatar_menu_.get());
} else if (sender == add_account_link_) {
+ ProfileMetrics::LogProfileDesktopSignout(
+ ProfileMetrics::PROFILE_DESKTOP_MENU_ADD_ACCT, opened_from_gaia_);
ShowView(BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT, avatar_menu_.get());
} else if (sender == tutorial_learn_more_link_) {
ProfileMetrics::LogProfileUpgradeEnrollment(

Powered by Google App Engine
This is Rietveld 408576698