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 a38ad3591343d4faecf60918e4ccb06da8bf8b74..ad55b1addd2b358630f41d79d57f36a2815829ae 100644 |
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
@@ -602,6 +602,7 @@ void ProfileChooserView::ShowBubble( |
profiles::BubbleViewMode view_mode, |
profiles::TutorialMode tutorial_mode, |
const signin::ManageAccountsParams& manage_accounts_params, |
+ signin_metrics::AccessPoint access_point, |
views::View* anchor_view, |
views::BubbleBorder::Arrow arrow, |
views::BubbleBorder::BubbleAlignment border_alignment, |
@@ -622,8 +623,9 @@ void ProfileChooserView::ShowBubble( |
return; |
} |
- profile_bubble_ = new ProfileChooserView(anchor_view, arrow, browser, |
- view_mode, tutorial_mode, manage_accounts_params.service_type); |
+ profile_bubble_ = new ProfileChooserView( |
+ anchor_view, arrow, browser, view_mode, tutorial_mode, |
+ manage_accounts_params.service_type, access_point); |
views::BubbleDelegateView::CreateBubble(profile_bubble_); |
profile_bubble_->set_close_on_deactivate(close_on_deactivate_for_testing_); |
profile_bubble_->SetAlignment(border_alignment); |
@@ -647,12 +649,14 @@ ProfileChooserView::ProfileChooserView(views::View* anchor_view, |
Browser* browser, |
profiles::BubbleViewMode view_mode, |
profiles::TutorialMode tutorial_mode, |
- signin::GAIAServiceType service_type) |
+ signin::GAIAServiceType service_type, |
+ signin_metrics::AccessPoint access_point) |
: BubbleDelegateView(anchor_view, arrow), |
browser_(browser), |
view_mode_(view_mode), |
tutorial_mode_(tutorial_mode), |
- gaia_service_type_(service_type) { |
+ gaia_service_type_(service_type), |
+ access_point_(access_point) { |
// Reset the default margins inherited from the BubbleDelegateView. |
// Add a small bottom inset so that the bubble's rounded corners show up. |
set_margins(gfx::Insets(0, 0, 1, 0)); |
@@ -1625,22 +1629,22 @@ views::View* ProfileChooserView::CreateGaiaSigninView( |
switch (view_mode_) { |
case profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN: |
- url = signin::GetPromoURL(signin_metrics::SOURCE_AVATAR_BUBBLE_SIGN_IN, |
- false /* auto_close */, |
- true /* is_constrained */); |
+ url = signin::GetPromoURL( |
+ access_point_, signin_metrics::REASON_SIGNIN_PRIMARY_ACCOUNT, |
+ false /* auto_close */, true /* is_constrained */); |
message_id = IDS_PROFILES_GAIA_SIGNIN_TITLE; |
break; |
case profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT: |
url = signin::GetPromoURL( |
- signin_metrics::SOURCE_AVATAR_BUBBLE_ADD_ACCOUNT, |
- false /* auto_close */, |
- true /* is_constrained */); |
+ access_point_, signin_metrics::REASON_ADD_SECONDARY_ACCOUNT, |
+ false /* auto_close */, true /* is_constrained */); |
message_id = IDS_PROFILES_GAIA_ADD_ACCOUNT_TITLE; |
break; |
case profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH: { |
DCHECK(HasAuthError(browser_->profile())); |
- url = signin::GetReauthURL(browser_->profile(), |
- GetAuthErrorAccountId(browser_->profile())); |
+ url = signin::GetReauthURL( |
+ access_point_, signin_metrics::REASON_REAUTHENTICATION, |
+ browser_->profile(), GetAuthErrorAccountId(browser_->profile())); |
message_id = IDS_PROFILES_GAIA_REAUTH_TITLE; |
break; |
} |