Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc

Issue 2856653004: Require a process ID when looking up RFHs by FrameTreeNode ID. (Closed)
Patch Set: Add comment. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc b/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc
index dc296f1574d22d4afec82ab106e0d626b23654a4..af988333ec8c609f61f5933d37fa76dbf0717485 100644
--- a/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_navigation_observer.cc
@@ -144,9 +144,11 @@ void SafeBrowsingNavigationObserver::DidStartNavigation(
// incorrect when another frame is targeting this frame. Need to refine this
// logic after the true initiator details are added to NavigationHandle
// (https://crbug.com/651895).
+ int current_process_id =
+ navigation_handle->GetStartingSiteInstance()->GetProcess()->GetID();
content::RenderFrameHost* current_frame_host =
navigation_handle->GetWebContents()->FindFrameByFrameTreeNodeId(
- nav_event->frame_id);
+ nav_event->frame_id, current_process_id);
// For browser initiated navigation (e.g. from address bar or bookmark), we
// don't fill the source_url to prevent attributing navigation to the last
// committed navigation.

Powered by Google App Engine
This is Rietveld 408576698