| Index: chrome/browser/external_protocol/external_protocol_handler.cc
|
| diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc
|
| index 2e4dcc1aaa251c9fd1a34d00cc89b0ae108ed734..2885d8a0c9b043be3b177a4f28befa7a0ae8cb03 100644
|
| --- a/chrome/browser/external_protocol/external_protocol_handler.cc
|
| +++ b/chrome/browser/external_protocol/external_protocol_handler.cc
|
| @@ -82,11 +82,13 @@ void LaunchUrlWithoutSecurityCheckWithDelegate(
|
| int render_process_host_id,
|
| int tab_contents_id,
|
| ExternalProtocolHandler::Delegate* delegate) {
|
| + content::WebContents* web_contents =
|
| + tab_util::GetWebContentsByID(render_process_host_id, tab_contents_id);
|
| +
|
| if (!delegate) {
|
| - ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(
|
| - url, render_process_host_id, tab_contents_id);
|
| + ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(url, web_contents);
|
| } else {
|
| - delegate->LaunchUrlWithoutSecurityCheck(url);
|
| + delegate->LaunchUrlWithoutSecurityCheck(url, web_contents);
|
| }
|
| }
|
|
|
| @@ -222,10 +224,9 @@ void ExternalProtocolHandler::LaunchUrlWithDelegate(
|
| // static
|
| void ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(
|
| const GURL& url,
|
| - int render_process_host_id,
|
| - int tab_contents_id) {
|
| - content::WebContents* web_contents = tab_util::GetWebContentsByID(
|
| - render_process_host_id, tab_contents_id);
|
| + content::WebContents* web_contents) {
|
| + // |web_contents| is only passed in to find browser context. Do not assume
|
| + // that the external protocol request came from the main frame.
|
| if (!web_contents)
|
| return;
|
|
|
|
|