Commit e691e170 authored by Jialiu Lin's avatar Jialiu Lin Committed by Commit Bot

Add a new enum value to indicate user action on settings

Introduce a new enum value to GaiaPasswordReuse::
PasswordReuseDialogInteraction to indicate user's clicked on change
password card on chrome://settings page.

Server side proto change landed in cl/212475859

Also remove user action logging on page info bubble, since they're
seldom used.

Bug: 882964
Change-Id: Id3492181efcbf862f7655438dad087922a91dc3d
Reviewed-on: https://chromium-review.googlesource.com/1220558Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Reviewed-by: default avatarDaniel Rubery <drubery@chromium.org>
Commit-Queue: Jialiu Lin <jialiul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591372}
parent d4657b62
...@@ -1064,9 +1064,6 @@ void ChromePasswordProtectionService::HandleUserActionOnPageInfo( ...@@ -1064,9 +1064,6 @@ void ChromePasswordProtectionService::HandleUserActionOnPageInfo(
const Origin origin = Origin::Create(url); const Origin origin = Origin::Create(url);
if (action == WarningAction::CHANGE_PASSWORD) { if (action == WarningAction::CHANGE_PASSWORD) {
MaybeLogPasswordReuseDialogInteraction(
GetNavigationIDFromPrefsByOrigin(profile_->GetPrefs(), origin),
PasswordReuseDialogInteraction::WARNING_ACTION_TAKEN);
// Directly open enterprise change password page in a new tab for enterprise // Directly open enterprise change password page in a new tab for enterprise
// reuses. // reuses.
if (password_type == PasswordReuseEvent::ENTERPRISE_PASSWORD) { if (password_type == PasswordReuseEvent::ENTERPRISE_PASSWORD) {
...@@ -1117,7 +1114,7 @@ void ChromePasswordProtectionService::HandleUserActionOnSettings( ...@@ -1117,7 +1114,7 @@ void ChromePasswordProtectionService::HandleUserActionOnSettings(
// event the user is responding to, so just pick the first one. // event the user is responding to, so just pick the first one.
MaybeLogPasswordReuseDialogInteraction( MaybeLogPasswordReuseDialogInteraction(
GetFirstNavIdOrZero(profile_->GetPrefs()), GetFirstNavIdOrZero(profile_->GetPrefs()),
PasswordReuseDialogInteraction::WARNING_ACTION_TAKEN); PasswordReuseDialogInteraction::WARNING_ACTION_TAKEN_ON_SETTINGS);
// Opens change password page in a new tab for user to change password. // Opens change password page in a new tab for user to change password.
OpenUrl(web_contents, GetDefaultChangePasswordURL(), OpenUrl(web_contents, GetDefaultChangePasswordURL(),
content::Referrer(web_contents->GetLastCommittedURL(), content::Referrer(web_contents->GetLastCommittedURL(),
......
...@@ -184,10 +184,10 @@ void PasswordProtectionRequest::FillRequestProto() { ...@@ -184,10 +184,10 @@ void PasswordProtectionRequest::FillRequestProto() {
reused_password_type_ == reused_password_type_ ==
LoginReputationClientRequest::PasswordReuseEvent::SIGN_IN_PASSWORD; LoginReputationClientRequest::PasswordReuseEvent::SIGN_IN_PASSWORD;
reuse_event->set_is_chrome_signin_password(matches_sync_password); reuse_event->set_is_chrome_signin_password(matches_sync_password);
reuse_event->set_reused_password_type(reused_password_type_);
if (matches_sync_password) { if (matches_sync_password) {
reuse_event->set_sync_account_type( reuse_event->set_sync_account_type(
password_protection_service_->GetSyncAccountType()); password_protection_service_->GetSyncAccountType());
reuse_event->set_reused_password_type(reused_password_type_);
LogSyncAccountType(reuse_event->sync_account_type()); LogSyncAccountType(reuse_event->sync_account_type());
} }
if (password_protection_service_->IsExtendedReporting() && if (password_protection_service_->IsExtendedReporting() &&
......
...@@ -675,6 +675,9 @@ base::DictionaryValue SerializePGEvent( ...@@ -675,6 +675,9 @@ base::DictionaryValue SerializePGEvent(
case PasswordReuseDialogInteraction::WARNING_UI_IGNORED: case PasswordReuseDialogInteraction::WARNING_UI_IGNORED:
interaction_result = "WARNING_UI_IGNORED"; interaction_result = "WARNING_UI_IGNORED";
break; break;
case PasswordReuseDialogInteraction::WARNING_ACTION_TAKEN_ON_SETTINGS:
interaction_result = "WARNING_ACTION_TAKEN_ON_SETTINGS";
break;
} }
event_dict.SetPath({"dialog_interaction", "interaction_result"}, event_dict.SetPath({"dialog_interaction", "interaction_result"},
base::Value(interaction_result)); base::Value(interaction_result));
......
...@@ -397,7 +397,8 @@ const char* ProtoEnumToString( ...@@ -397,7 +397,8 @@ const char* ProtoEnumToString(
PasswordReuseDialogInteraction::InteractionResult interaction_result) { PasswordReuseDialogInteraction::InteractionResult interaction_result) {
ASSERT_ENUM_BOUNDS(sync_pb::UserEventSpecifics::GaiaPasswordReuse:: ASSERT_ENUM_BOUNDS(sync_pb::UserEventSpecifics::GaiaPasswordReuse::
PasswordReuseDialogInteraction, PasswordReuseDialogInteraction,
InteractionResult, UNSPECIFIED, WARNING_UI_IGNORED); InteractionResult, UNSPECIFIED,
WARNING_ACTION_TAKEN_ON_SETTINGS);
switch (interaction_result) { switch (interaction_result) {
ENUM_CASE(sync_pb::UserEventSpecifics::GaiaPasswordReuse:: ENUM_CASE(sync_pb::UserEventSpecifics::GaiaPasswordReuse::
PasswordReuseDialogInteraction, PasswordReuseDialogInteraction,
...@@ -411,6 +412,9 @@ const char* ProtoEnumToString( ...@@ -411,6 +412,9 @@ const char* ProtoEnumToString(
ENUM_CASE(sync_pb::UserEventSpecifics::GaiaPasswordReuse:: ENUM_CASE(sync_pb::UserEventSpecifics::GaiaPasswordReuse::
PasswordReuseDialogInteraction, PasswordReuseDialogInteraction,
WARNING_UI_IGNORED); WARNING_UI_IGNORED);
ENUM_CASE(sync_pb::UserEventSpecifics::GaiaPasswordReuse::
PasswordReuseDialogInteraction,
WARNING_ACTION_TAKEN_ON_SETTINGS);
} }
NOTREACHED(); NOTREACHED();
return ""; return "";
......
...@@ -241,7 +241,7 @@ message UserEventSpecifics { ...@@ -241,7 +241,7 @@ message UserEventSpecifics {
// Phishing or a Low-reputation site. // Phishing or a Low-reputation site.
optional PasswordReuseLookup reuse_lookup = 2; optional PasswordReuseLookup reuse_lookup = 2;
// Logged when the user interacts with the dialog shown to encourage // Logged when the user interacts with the warning UI shown to encourage
// password change if the site is Phishing or Low-reputation. // password change if the site is Phishing or Low-reputation.
message PasswordReuseDialogInteraction { message PasswordReuseDialogInteraction {
enum InteractionResult { enum InteractionResult {
...@@ -253,6 +253,8 @@ message UserEventSpecifics { ...@@ -253,6 +253,8 @@ message UserEventSpecifics {
// The warning UI was ignored, i.e. not interacted with by the user. // The warning UI was ignored, i.e. not interacted with by the user.
// This could happen if the user navigates away from the page. // This could happen if the user navigates away from the page.
WARNING_UI_IGNORED = 3; WARNING_UI_IGNORED = 3;
// The user clicked "Change Password" on chrome://settings page.
WARNING_ACTION_TAKEN_ON_SETTINGS = 4;
} }
optional InteractionResult interaction_result = 1; optional InteractionResult interaction_result = 1;
} }
......
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