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 5d35fcd96461d9af1500346ad53b616763c9d06d..9734b5b3b7e4a748f8256b15d1d34a7dee8a4a67 100644 |
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
@@ -421,8 +421,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()); |
@@ -568,6 +571,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 |
@@ -630,6 +635,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()); |
@@ -662,6 +670,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( |