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

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

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 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;
}

Powered by Google App Engine
This is Rietveld 408576698