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

Issue 1459473003: Add a WebContents getter callback in ResourceRequestInfo (Closed)

Created:
5 years, 1 month ago by clamy
Modified:
5 years ago
CC:
chromium-reviews, loading-reviews_chromium.org, darin-cc_chromium.org, jam, carlosk
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a WebContents getter callback in ResourceRequestInfo This CL adds a method to ResourceRequestInfo that returns a callback that can be used on the UI thread to get the WebContents associated with the request.It is used in the SSLErrorHandler code, instead of using a RenderProcessHost ID and a RenderFrameHost ID directly .This allows SSL error interstitials to work with PlzNavigate enabled. BUG = 504347 Committed: https://crrev.com/0d32d6d30fec43e2ad159193c65ace6636537b23 Cr-Commit-Position: refs/heads/master@{#361314}

Patch Set 1 #

Patch Set 2 : #

Total comments: 23

Patch Set 3 : Addressed davidben's comments #

Total comments: 4

Patch Set 4 : Rebase + addressed David's comments #

Total comments: 12

Patch Set 5 : Addressed Nasko's comments #

Total comments: 2

Patch Set 6 : Addressed Nasko's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -98 lines) Patch
M android_webview/browser/aw_content_browser_client.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 chunks +6 lines, -13 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M chromecast/browser/cast_content_browser_client.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/loader/resource_loader.cc View 1 2 3 1 chunk +2 lines, -12 lines 0 comments Download
M content/browser/loader/resource_request_info_impl.h View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/loader/resource_request_info_impl.cc View 1 2 3 4 5 2 chunks +43 lines, -0 lines 0 comments Download
M content/browser/renderer_host/websocket_host.cc View 1 2 3 2 chunks +4 lines, -7 lines 0 comments Download
M content/browser/ssl/ssl_cert_error_handler.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/ssl/ssl_cert_error_handler.cc View 1 2 1 chunk +2 lines, -9 lines 0 comments Download
M content/browser/ssl/ssl_error_handler.h View 1 2 3 4 5 chunks +6 lines, -11 lines 0 comments Download
M content/browser/ssl/ssl_error_handler.cc View 1 2 3 4 3 chunks +9 lines, -10 lines 0 comments Download
M content/browser/ssl/ssl_manager.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M content/browser/ssl/ssl_manager.cc View 1 2 3 4 5 3 chunks +18 lines, -11 lines 0 comments Download
M content/browser/ssl/ssl_policy.cc View 1 2 3 4 1 chunk +4 lines, -10 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 26 (7 generated)
clamy
@nasko, davidben: PTAL. This is the patch for having a callback in ResourceRequestInfo. I'm also ...
5 years, 1 month ago (2015-11-19 13:39:41 UTC) #3
davidben
Yeesh, this SSL code is a mess. https://codereview.chromium.org/1459473003/diff/20001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1459473003/diff/20001/chrome/browser/chrome_content_browser_client.cc#newcode1961 chrome/browser/chrome_content_browser_client.cc:1961: web_contents_getter, Rather ...
5 years, 1 month ago (2015-11-19 17:46:13 UTC) #4
davidben
On 2015/11/19 17:46:13, davidben (slow) wrote: > Yeesh, this SSL code is a mess. (Not ...
5 years, 1 month ago (2015-11-19 17:46:47 UTC) #5
davidben
https://codereview.chromium.org/1459473003/diff/20001/content/browser/ssl/ssl_policy.cc File content/browser/ssl/ssl_policy.cc (right): https://codereview.chromium.org/1459473003/diff/20001/content/browser/ssl/ssl_policy.cc#newcode235 content/browser/ssl/ssl_policy.cc:235: handler->web_contents_getter(), Oh! And even SSLPolicy is a per-WebContents object! ...
5 years, 1 month ago (2015-11-19 17:50:25 UTC) #6
clamy
Thanks! https://codereview.chromium.org/1459473003/diff/20001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/1459473003/diff/20001/chrome/browser/chrome_content_browser_client.cc#newcode1961 chrome/browser/chrome_content_browser_client.cc:1961: web_contents_getter, On 2015/11/19 17:46:13, davidben (slow) wrote: > ...
5 years, 1 month ago (2015-11-20 13:50:43 UTC) #7
davidben
lgtm. This actually isn't used outside of //content anymore, but it will be later, so ...
5 years, 1 month ago (2015-11-20 22:19:54 UTC) #8
clamy
@davidben: thanks! As per content/public rules, I unexposed the method from the public interface. @mnnaganov: ...
5 years ago (2015-11-23 16:44:09 UTC) #10
mnaganov (inactive)
android_webview/ LGTM https://codereview.chromium.org/1459473003/diff/60001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/1459473003/diff/60001/android_webview/browser/aw_content_browser_client.cc#newcode370 android_webview/browser/aw_content_browser_client.cc:370: AwContentsClientBridgeBase::FromWebContents(web_contents); Thanks! Looks like we can now ...
5 years ago (2015-11-23 16:47:42 UTC) #11
nasko
Some drive-by nits. https://codereview.chromium.org/1459473003/diff/60001/content/browser/loader/resource_request_info_impl.cc File content/browser/loader/resource_request_info_impl.cc (right): https://codereview.chromium.org/1459473003/diff/60001/content/browser/loader/resource_request_info_impl.cc#newcode217 content/browser/loader/resource_request_info_impl.cc:217: NOTREACHED(); Since this is a macro ...
5 years ago (2015-11-23 17:00:24 UTC) #12
halliwell
On 2015/11/23 17:00:24, nasko wrote: > Some drive-by nits. > > https://codereview.chromium.org/1459473003/diff/60001/content/browser/loader/resource_request_info_impl.cc > File content/browser/loader/resource_request_info_impl.cc ...
5 years ago (2015-11-23 17:22:05 UTC) #13
clamy
Thanks! https://codereview.chromium.org/1459473003/diff/60001/content/browser/loader/resource_request_info_impl.cc File content/browser/loader/resource_request_info_impl.cc (right): https://codereview.chromium.org/1459473003/diff/60001/content/browser/loader/resource_request_info_impl.cc#newcode217 content/browser/loader/resource_request_info_impl.cc:217: NOTREACHED(); On 2015/11/23 17:00:24, nasko wrote: > Since ...
5 years ago (2015-11-23 17:56:54 UTC) #14
nasko
https://codereview.chromium.org/1459473003/diff/80001/content/browser/web_contents/web_contents_impl.h File content/browser/web_contents/web_contents_impl.h (right): https://codereview.chromium.org/1459473003/diff/80001/content/browser/web_contents/web_contents_impl.h#newcode116 content/browser/web_contents/web_contents_impl.h:116: static WebContents* FromRPHAndRFHIDs(int render_process_host_id, How about FromRenderFrameHostId or FromFrameRoutingId ...
5 years ago (2015-11-23 18:08:26 UTC) #15
clamy
Thanks! https://codereview.chromium.org/1459473003/diff/80001/content/browser/web_contents/web_contents_impl.h File content/browser/web_contents/web_contents_impl.h (right): https://codereview.chromium.org/1459473003/diff/80001/content/browser/web_contents/web_contents_impl.h#newcode116 content/browser/web_contents/web_contents_impl.h:116: static WebContents* FromRPHAndRFHIDs(int render_process_host_id, On 2015/11/23 18:08:26, nasko ...
5 years ago (2015-11-23 18:28:08 UTC) #16
nasko
LGTM
5 years ago (2015-11-23 18:29:01 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1459473003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1459473003/100001
5 years ago (2015-11-23 18:35:59 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/132893)
5 years ago (2015-11-23 20:30:39 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1459473003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1459473003/100001
5 years ago (2015-11-24 10:39:15 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years ago (2015-11-24 11:16:33 UTC) #25
commit-bot: I haz the power
5 years ago (2015-11-24 11:17:26 UTC) #26
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/0d32d6d30fec43e2ad159193c65ace6636537b23
Cr-Commit-Position: refs/heads/master@{#361314}

Powered by Google App Engine
This is Rietveld 408576698