Chromium Code Reviews| Index: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc |
| diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc |
| index a2f943e4c801cb410424d447e87c0e70912f6476..7fb66613b0ae250ce2447b33564fc1f797574ab4 100644 |
| --- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc |
| +++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc |
| @@ -217,9 +217,12 @@ void SendExecuteMimeTypeHandlerEvent( |
| } |
| #endif // !BUILDFLAG(ENABLE_EXTENSIONS) |
| +// TODO(davidsac): get rid of useless_render_process_id parameter??? |
|
alexmos
2016/12/01 19:21:14
Yes, let's remove this argument.
davidsac (gone - try alexmos)
2016/12/12 19:15:47
Done.
|
| +// TODO(davidsac): replace occurences of tab_contents_id with |
|
alexmos
2016/12/01 19:21:14
This comment is for a function that doesn't actual
davidsac (gone - try alexmos)
2016/12/12 19:15:47
Done.
|
| +// render_view_routing_id |
| void LaunchURL( |
| const GURL& url, |
| - int render_process_id, |
| + int useless_render_process_id, |
| const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter, |
| ui::PageTransition page_transition, |
| bool has_user_gesture, |
| @@ -227,6 +230,9 @@ void LaunchURL( |
| // If there is no longer a WebContents, the request may have raced with tab |
| // closing. Don't fire the external request. (It may have been a prerender.) |
| content::WebContents* web_contents = web_contents_getter.Run(); |
| + |
| + int render_process_id = |
| + web_contents->GetRenderViewHost()->GetProcess()->GetID(); |
| if (!web_contents) |
| return; |
| @@ -245,9 +251,7 @@ void LaunchURL( |
| // TODO(davidsac): External protocol handling needs to be |
| // fixed for OOPIFs. See https://crbug.com/668289. |
| if (is_whitelisted) { |
| - ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck( |
| - url, render_process_id, |
| - web_contents->GetRenderViewHost()->GetRoutingID()); |
| + ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents); |
| } else { |
| ExternalProtocolHandler::LaunchUrlWithDelegate( |
| url, render_process_id, |