Commit 39fda35b authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Adding user action metrics when signing in

For some reasons, those metrics were not implemented for
sign-in before unity.
  + Signin_Signin_WithDefaultSyncSettings
  + Signin_Signin_WithAdvancedSyncSettings

This patch adds implementations for those 2 metrics for pre-unity
and unity code.

Also "Signin_Undo_Signin" is added for unity code (already implemented)
with pre-unity.

Bug: 937820
Change-Id: I27ec9769e9954b1daeccd273f4d663c35f9fa605
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1496981Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637585}
parent 86a57c84
...@@ -252,6 +252,13 @@ enum AuthenticationState { ...@@ -252,6 +252,13 @@ enum AuthenticationState {
- (void)acceptSignInAndShowAccountsSettings:(BOOL)showAccountsSettings { - (void)acceptSignInAndShowAccountsSettings:(BOOL)showAccountsSettings {
signin_metrics::LogSigninAccessPointCompleted(_accessPoint, _promoAction); signin_metrics::LogSigninAccessPointCompleted(_accessPoint, _promoAction);
if (showAccountsSettings) {
base::RecordAction(
base::UserMetricsAction("Signin_Signin_WithAdvancedSyncSettings"));
} else {
base::RecordAction(
base::UserMetricsAction("Signin_Signin_WithDefaultSyncSettings"));
}
std::vector<int> consent_text_ids; std::vector<int> consent_text_ids;
int openSettingsStringId = -1; int openSettingsStringId = -1;
if (_unifiedConsentEnabled) { if (_unifiedConsentEnabled) {
...@@ -991,6 +998,9 @@ enum AuthenticationState { ...@@ -991,6 +998,9 @@ enum AuthenticationState {
return; return;
case IDENTITY_PICKER_STATE: case IDENTITY_PICKER_STATE:
if (!_didFinishSignIn) { if (!_didFinishSignIn) {
if (_unifiedConsentEnabled) {
base::RecordAction(base::UserMetricsAction("Signin_Undo_Signin"));
}
_didFinishSignIn = YES; _didFinishSignIn = YES;
[_delegate didSkipSignIn:self]; [_delegate didSkipSignIn:self];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment