Commit 4b292751 authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Small followup to r519351 to make ClientSideDetectionHost ignore same-document navigations.

Bug: 783981
Change-Id: I41afc98d8c9d60051cde53f3d17c28515ec9a8aa
Reviewed-on: https://chromium-review.googlesource.com/807403Reviewed-by: default avatarJialiu Lin <jialiul@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521589}
parent 5c23fe6e
......@@ -375,7 +375,8 @@ bool ClientSideDetectionHost::OnMessageReceived(
void ClientSideDetectionHost::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
if (browse_info_.get() && should_extract_malware_features_ &&
navigation_handle->HasCommitted() && !navigation_handle->IsDownload()) {
navigation_handle->HasCommitted() && !navigation_handle->IsDownload() &&
!navigation_handle->IsSameDocument()) {
content::ResourceType resource_type =
navigation_handle->IsInMainFrame() ? content::RESOURCE_TYPE_MAIN_FRAME
: content::RESOURCE_TYPE_SUB_FRAME;
......
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