Commit 0558d319 authored by Bettina's avatar Bettina Committed by Commit Bot

Disable SecurityEventRecorder call.

The call to SecurityEventRecorder causes Chrome to
throw a segmentation fault. Commenting out to be able
to allow non-sync password protection to be available
in dev/canary.

Bug: 914410
Change-Id: I67c5deef7f206fac204b9fe459be2ac15dd958ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1765995
Commit-Queue: Bettina Dea <bdea@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689980}
parent 2416c9a5
......@@ -807,15 +807,17 @@ void ChromePasswordProtectionService::
// If password_type == OTHER_GAIA_PASSWORD, the account is not syncing.
// Therefore, we have to use the security event recorder to log events to mark
// the account at risk in order to send data to Google.
// the account at risk.
if (password_type == PasswordType::OTHER_GAIA_PASSWORD) {
sync_pb::GaiaPasswordReuse gaia_password_reuse_event;
*gaia_password_reuse_event.mutable_reuse_lookup() = reuse_lookup;
WebUIInfoSingleton::GetInstance()->AddToSecurityEvents(
gaia_password_reuse_event);
SecurityEventRecorderFactory::GetForProfile(profile_)
->RecordGaiaPasswordReuse(gaia_password_reuse_event);
// TODO(crbug/914410): Renable once we know the SecurityEventRecorder won't
// crash Chrome.
// SecurityEventRecorderFactory::GetForProfile(profile_)
// ->RecordGaiaPasswordReuse(gaia_password_reuse_event);
} else {
syncer::UserEventService* user_event_service =
browser_sync::UserEventServiceFactory::GetForProfile(profile_);
......
......@@ -654,20 +654,23 @@ TEST_F(ChromePasswordProtectionServiceTest,
// multiple prefs and doesn't add much verification value.
}
TEST_F(ChromePasswordProtectionServiceTest,
VerifyPasswordReuseDetectedSecurityEventRecorded) {
EXPECT_CALL(*security_event_recorder_, RecordGaiaPasswordReuse(_))
.WillOnce(WithArg<0>([&](const auto& message) {
EXPECT_EQ(PasswordReuseLookup::REQUEST_SUCCESS,
message.reuse_lookup().lookup_result());
EXPECT_EQ(PasswordReuseLookup::SAFE, message.reuse_lookup().verdict());
EXPECT_EQ("verdict_token", message.reuse_lookup().verdict_token());
}));
service_->MaybeLogPasswordReuseLookupResultWithVerdict(
web_contents(), PasswordType::OTHER_GAIA_PASSWORD,
PasswordReuseLookup::REQUEST_SUCCESS, PasswordReuseLookup::SAFE,
"verdict_token");
}
// TODO(crbug/914410): Renable once we know the SecurityEventRecorder won't
// crash Chrome.
// TEST_F(ChromePasswordProtectionServiceTest,
// VerifyPasswordReuseDetectedSecurityEventRecorded) {
// EXPECT_CALL(*security_event_recorder_, RecordGaiaPasswordReuse(_))
// .WillOnce(WithArg<0>([&](const auto& message) {
// EXPECT_EQ(PasswordReuseLookup::REQUEST_SUCCESS,
// message.reuse_lookup().lookup_result());
// EXPECT_EQ(PasswordReuseLookup::SAFE,
// message.reuse_lookup().verdict()); EXPECT_EQ("verdict_token",
// message.reuse_lookup().verdict_token());
// }));
// service_->MaybeLogPasswordReuseLookupResultWithVerdict(
// web_contents(), PasswordType::OTHER_GAIA_PASSWORD,
// PasswordReuseLookup::REQUEST_SUCCESS, PasswordReuseLookup::SAFE,
// "verdict_token");
// }
// Check that the PaswordCapturedEvent timer is set for 1 min if password
// hash is saved and no timer pref is set yet.
......
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