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

Issue 2538353002: fix external protocol handling for OOPIFs (Closed)

Created:
4 years ago by davidsac (gone - try alexmos)
Modified:
4 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, tburkard+watch_chromium.org, Randy Smith (Not in Mondays), gavinp+prer_chromium.org, loading-reviews_chromium.org, mmenke, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

fix external protocol handling for OOPIFs Replace using the wrong render_process_id for launching external protocol requests in chrome_resource_dispatcher_host_delegate.cc. Previously, handlers for external protocols like 'mailto:' weren't working for OOPIFs because the render_process_id used to retrieve the content::WebContents object was incorrect. BUG=668289 TEST=See bug for repro steps Committed: https://crrev.com/1fe2ac646c67872405598ad551dc4b2b430cfce4 Cr-Commit-Position: refs/heads/master@{#439654}

Patch Set 1 : add fix, test and refactor for testing #

Patch Set 2 : rebase #

Total comments: 44

Patch Set 3 : minor implementation fixes, clean up comments #

Patch Set 4 : more minor fixes #

Patch Set 5 : fix memory leak #

Patch Set 6 : memory leak actual fix #

Patch Set 7 : add log statements to investigate seg faults #

Patch Set 8 : Rebase #

Patch Set 9 : add nullcheck for runner #

Patch Set 10 : add check if runner is necessary #

Total comments: 34

Patch Set 11 : add log statements for ChromeOS test #

Patch Set 12 : minor code cleanup #

Patch Set 13 : added all the logs statements #

Patch Set 14 : remove log statements #

Patch Set 15 : disable test in ChromeOS #

Total comments: 10

Patch Set 16 : more small cleanups #

Total comments: 6

Patch Set 17 : add comment #

Patch Set 18 : add bug reference for TODO #

Total comments: 13

Patch Set 19 : remove unnecessary include #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -26 lines) Patch
M chrome/browser/chrome_site_per_process_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +111 lines, -0 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/external_protocol/external_protocol_handler_unittest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +5 lines, -10 lines 0 comments Download
M chrome/browser/prerender/prerender_test_utils.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/external_protocol_dialog.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/external_protocol_dialog_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -2 lines 0 comments Download
A chrome/test/data/page_with_mailto.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 94 (65 generated)
davidsac (gone - try alexmos)
Hi Alex, Would you mind taking a look at this first draft for fixing the ...
4 years ago (2016-12-01 02:58:44 UTC) #4
davidsac (gone - try alexmos)
I am considering fixing tab_contents_id with a separate CL.
4 years ago (2016-12-01 02:59:31 UTC) #7
alexmos
[+site-isolation-reviews] Thanks Andrew, this is a good start! Some initial comments below, and also looks ...
4 years ago (2016-12-01 19:21:14 UTC) #12
davidsac (gone - try alexmos)
The requested fixes have been added.
4 years ago (2016-12-12 19:14:33 UTC) #45
davidsac (gone - try alexmos)
The requested fixes have been added. https://codereview.chromium.org/2538353002/diff/20001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/2538353002/diff/20001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode12 chrome/browser/chrome_site_per_process_browsertest.cc:12: #include "chrome/browser/external_protocol/external_protocol_handler_unittest.cc" On ...
4 years ago (2016-12-12 19:15:47 UTC) #46
alexmos
Thanks, looks much better! Second round of comments, which are mostly minor, and let's investigate ...
4 years ago (2016-12-12 21:11:40 UTC) #47
davidsac (gone - try alexmos)
All requested fixes have been made. https://codereview.chromium.org/2538353002/diff/180001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/2538353002/diff/180001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode6 chrome/browser/chrome_site_per_process_browsertest.cc:6: #include "base/debug/stack_trace.h" On ...
4 years ago (2016-12-13 23:02:33 UTC) #50
alexmos
Thanks, LGTM with nits. https://codereview.chromium.org/2538353002/diff/280001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/2538353002/diff/280001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode369 chrome/browser/chrome_site_per_process_browsertest.cc:369: // request succeeds. nit: looks ...
4 years ago (2016-12-13 23:27:28 UTC) #51
davidsac (gone - try alexmos)
All requested fixes have been made. https://codereview.chromium.org/2538353002/diff/280001/chrome/browser/chrome_site_per_process_browsertest.cc File chrome/browser/chrome_site_per_process_browsertest.cc (right): https://codereview.chromium.org/2538353002/diff/280001/chrome/browser/chrome_site_per_process_browsertest.cc#newcode369 chrome/browser/chrome_site_per_process_browsertest.cc:369: // request succeeds. ...
4 years ago (2016-12-14 00:01:31 UTC) #54
davidsac (gone - try alexmos)
Hi, meacer@, could you please review this changelist for OWNER approval of chrome/browser/external_protocol/ ? cresi@, ...
4 years ago (2016-12-14 00:18:54 UTC) #56
Charlie Reis
Thanks! LGTM with one rename. https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.cc File chrome/browser/external_protocol/external_protocol_handler.cc (right): https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.cc#newcode83 chrome/browser/external_protocol/external_protocol_handler.cc:83: int tab_contents_id, Let's rename ...
4 years ago (2016-12-15 00:10:04 UTC) #60
davidsac (gone - try alexmos)
All issues have been handled. https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.cc File chrome/browser/external_protocol/external_protocol_handler.cc (right): https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.cc#newcode83 chrome/browser/external_protocol/external_protocol_handler.cc:83: int tab_contents_id, This will ...
4 years ago (2016-12-15 01:49:26 UTC) #65
meacer
chrome/browser/external_protocol/ lgtm https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.h File chrome/browser/external_protocol/external_protocol_handler.h (right): https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.h#newcode111 chrome/browser/external_protocol/external_protocol_handler.h:111: // TODO(davidsac): Consider refactoring this to take ...
4 years ago (2016-12-15 01:54:16 UTC) #66
davidsac (gone - try alexmos)
The bug number has been added to the TODO https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.h File chrome/browser/external_protocol/external_protocol_handler.h (right): https://codereview.chromium.org/2538353002/diff/300001/chrome/browser/external_protocol/external_protocol_handler.h#newcode111 chrome/browser/external_protocol/external_protocol_handler.h:111: ...
4 years ago (2016-12-15 19:39:41 UTC) #67
davidsac (gone - try alexmos)
sky, Could you please review this changelist for OWNER approval for the rest of the ...
4 years ago (2016-12-15 19:41:52 UTC) #69
sky
+mmenke for c/b/loader https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/ui/cocoa/external_protocol_dialog.mm File chrome/browser/ui/cocoa/external_protocol_dialog.mm (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/ui/cocoa/external_protocol_dialog.mm#newcode121 chrome/browser/ui/cocoa/external_protocol_dialog.mm:121: tab_util::GetWebContentsByID(render_process_host_id_, routing_id_); How do you know ...
4 years ago (2016-12-15 20:44:28 UTC) #71
mmenke
https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode249 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:249: url, web_contents->GetRenderViewHost()->GetProcess()->GetID(), How can we be sure the process ...
4 years ago (2016-12-15 20:54:55 UTC) #72
Charlie Reis
https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode249 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:249: url, web_contents->GetRenderViewHost()->GetProcess()->GetID(), On 2016/12/15 20:54:54, mmenke (Out Dec 17 ...
4 years ago (2016-12-15 21:55:06 UTC) #73
davidsac (gone - try alexmos)
https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode249 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:249: url, web_contents->GetRenderViewHost()->GetProcess()->GetID(), Yes, we could keep passing the process_id ...
4 years ago (2016-12-15 22:40:23 UTC) #74
mmenke
https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode249 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:249: url, web_contents->GetRenderViewHost()->GetProcess()->GetID(), On 2016/12/15 22:40:23, davidsac wrote: > Yes, ...
4 years ago (2016-12-16 16:24:17 UTC) #75
alexmos
https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode249 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:249: url, web_contents->GetRenderViewHost()->GetProcess()->GetID(), On 2016/12/16 16:24:17, mmenke (Out Dec 17 ...
4 years ago (2016-12-16 21:11:38 UTC) #76
mmenke
Thanks for the explanation! chrome/browser/loader LGTM. Does seem a bit weird to be using PIDs/frame ...
4 years ago (2016-12-16 21:37:29 UTC) #77
davidsac (gone - try alexmos)
Hi msw, Unfortunately, sky is out of office and I'm not sure when he will ...
4 years ago (2016-12-19 19:53:32 UTC) #79
msw
c/b/ui lgtm; hopefully Scott would have said the same. https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/ui/cocoa/external_protocol_dialog.mm File chrome/browser/ui/cocoa/external_protocol_dialog.mm (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/ui/cocoa/external_protocol_dialog.mm#newcode15 chrome/browser/ui/cocoa/external_protocol_dialog.mm:15: ...
4 years ago (2016-12-19 20:26:55 UTC) #80
davidsac (gone - try alexmos)
mmenke, We will make this change in a followup CL. Thank you for this suggestion!
4 years ago (2016-12-19 21:45:23 UTC) #81
davidsac (gone - try alexmos)
https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/ui/cocoa/external_protocol_dialog.mm File chrome/browser/ui/cocoa/external_protocol_dialog.mm (right): https://codereview.chromium.org/2538353002/diff/340001/chrome/browser/ui/cocoa/external_protocol_dialog.mm#newcode15 chrome/browser/ui/cocoa/external_protocol_dialog.mm:15: #include "content/public/browser/web_contents.h" On 2016/12/19 20:26:55, msw wrote: > optional ...
4 years ago (2016-12-19 22:23:45 UTC) #84
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2538353002/360001
4 years ago (2016-12-20 01:22:00 UTC) #89
commit-bot: I haz the power
Committed patchset #19 (id:360001)
4 years ago (2016-12-20 01:28:19 UTC) #92
commit-bot: I haz the power
4 years ago (2016-12-20 01:32:36 UTC) #94
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/1fe2ac646c67872405598ad551dc4b2b430cfce4
Cr-Commit-Position: refs/heads/master@{#439654}

Powered by Google App Engine
This is Rietveld 408576698