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:: ...@@ -807,15 +807,17 @@ void ChromePasswordProtectionService::
// If password_type == OTHER_GAIA_PASSWORD, the account is not syncing. // 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 // 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) { if (password_type == PasswordType::OTHER_GAIA_PASSWORD) {
sync_pb::GaiaPasswordReuse gaia_password_reuse_event; sync_pb::GaiaPasswordReuse gaia_password_reuse_event;
*gaia_password_reuse_event.mutable_reuse_lookup() = reuse_lookup; *gaia_password_reuse_event.mutable_reuse_lookup() = reuse_lookup;
WebUIInfoSingleton::GetInstance()->AddToSecurityEvents( WebUIInfoSingleton::GetInstance()->AddToSecurityEvents(
gaia_password_reuse_event); gaia_password_reuse_event);
SecurityEventRecorderFactory::GetForProfile(profile_) // TODO(crbug/914410): Renable once we know the SecurityEventRecorder won't
->RecordGaiaPasswordReuse(gaia_password_reuse_event); // crash Chrome.
// SecurityEventRecorderFactory::GetForProfile(profile_)
// ->RecordGaiaPasswordReuse(gaia_password_reuse_event);
} else { } else {
syncer::UserEventService* user_event_service = syncer::UserEventService* user_event_service =
browser_sync::UserEventServiceFactory::GetForProfile(profile_); browser_sync::UserEventServiceFactory::GetForProfile(profile_);
......
...@@ -654,20 +654,23 @@ TEST_F(ChromePasswordProtectionServiceTest, ...@@ -654,20 +654,23 @@ TEST_F(ChromePasswordProtectionServiceTest,
// multiple prefs and doesn't add much verification value. // multiple prefs and doesn't add much verification value.
} }
TEST_F(ChromePasswordProtectionServiceTest, // TODO(crbug/914410): Renable once we know the SecurityEventRecorder won't
VerifyPasswordReuseDetectedSecurityEventRecorded) { // crash Chrome.
EXPECT_CALL(*security_event_recorder_, RecordGaiaPasswordReuse(_)) // TEST_F(ChromePasswordProtectionServiceTest,
.WillOnce(WithArg<0>([&](const auto& message) { // VerifyPasswordReuseDetectedSecurityEventRecorded) {
EXPECT_EQ(PasswordReuseLookup::REQUEST_SUCCESS, // EXPECT_CALL(*security_event_recorder_, RecordGaiaPasswordReuse(_))
message.reuse_lookup().lookup_result()); // .WillOnce(WithArg<0>([&](const auto& message) {
EXPECT_EQ(PasswordReuseLookup::SAFE, message.reuse_lookup().verdict()); // EXPECT_EQ(PasswordReuseLookup::REQUEST_SUCCESS,
EXPECT_EQ("verdict_token", message.reuse_lookup().verdict_token()); // message.reuse_lookup().lookup_result());
})); // EXPECT_EQ(PasswordReuseLookup::SAFE,
service_->MaybeLogPasswordReuseLookupResultWithVerdict( // message.reuse_lookup().verdict()); EXPECT_EQ("verdict_token",
web_contents(), PasswordType::OTHER_GAIA_PASSWORD, // message.reuse_lookup().verdict_token());
PasswordReuseLookup::REQUEST_SUCCESS, PasswordReuseLookup::SAFE, // }));
"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 // Check that the PaswordCapturedEvent timer is set for 1 min if password
// hash is saved and no timer pref is set yet. // 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