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

Add recent navigation to PhishGuard ping referrer chain

Bug: 825268
Change-Id: I575c9600b2989fbedc78bfa38f4888b8aec8965d
Reviewed-on: https://chromium-review.googlesource.com/978505
Commit-Queue: Jialiu Lin <jialiul@chromium.org>
Reviewed-by: default avatarLuke Z <lpz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545637}
parent 084cdb25
......@@ -222,12 +222,21 @@ void ChromePasswordProtectionService::FillReferrerChain(
navigation_observer_manager_->IdentifyReferrerChainByEventURL(
event_url, event_tab_id, kPasswordEventAttributionUserGestureLimit,
frame->mutable_referrer_chain());
size_t referrer_chain_length = frame->referrer_chain().size();
UMA_HISTOGRAM_COUNTS_100(
"SafeBrowsing.ReferrerURLChainSize.PasswordEventAttribution",
frame->referrer_chain().size());
referrer_chain_length);
UMA_HISTOGRAM_ENUMERATION(
"SafeBrowsing.ReferrerAttributionResult.PasswordEventAttribution", result,
SafeBrowsingNavigationObserverManager::ATTRIBUTION_FAILURE_TYPE_MAX);
// Determines how many recent navigation events to append to referrer chain.
size_t recent_navigations_to_collect =
profile_ ? SafeBrowsingNavigationObserverManager::
CountOfRecentNavigationsToAppend(*profile_, result)
: 0u;
navigation_observer_manager_->AppendRecentNavigations(
recent_navigations_to_collect, frame->mutable_referrer_chain());
}
void ChromePasswordProtectionService::ShowModalWarning(
......
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