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

Issue 899883004: Added chrome-side support for link rel=preconnect (Closed)

Created:
5 years, 10 months ago by Pat Meenan
Modified:
5 years, 10 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added chrome-side support for link rel=preconnect This plumbs the blink preconnect support through to the existing preconnect implementation exposed by the predictor. There was an existing IPC for most of the plumbing that wasn't being used. There was a bit of structural movement: - Moved the IPC definition to the new network_hints component - Renamed the IPC message to fall into a namespace used by network_hints - Renamed the DNS prefetch IPC into the same namespace - Added a connection count to the preconnect IPC And the actual plumbing itself which mirrors the behavior of the DNS prefetch plumbing where it queues the requests and posts a task back to itself for submitting the actual requests at a later point. It also counts preconnect requests for the same URL and uses that as an indicator that more connections are needed (as many connections as requests up to a limit of 6). This will only work if the URLs are discovered after each other and before the scheduled task gets run which will easily be the case for link tags that are grouped together but may not be the case if they are scattered through the head (an acceptable tradeoff). The net stack will de-dupe preconnect requests and just leverage existing or pending connections which is why we need to accumulate and count before requesting. BUG=450682 Committed: https://crrev.com/ec1939d34edef32fbda9e2a6d3722749e343f5a8 Cr-Commit-Position: refs/heads/master@{#315782}

Patch Set 1 #

Patch Set 2 : Clear the preconnect map after processing #

Total comments: 24

Patch Set 3 : Addressed review feedback #

Total comments: 2

Patch Set 4 : Addressed formatting nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -25 lines) Patch
M chrome/browser/net/url_info.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 1 2 4 chunks +14 lines, -6 lines 0 comments Download
M chrome/common/render_messages.h View 1 chunk +0 lines, -4 lines 0 comments Download
M components/network_hints.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
A + components/network_hints/DEPS View 1 chunk +5 lines, -7 lines 0 comments Download
M components/network_hints/browser/network_hints_message_filter.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M components/network_hints/common/network_hints_messages.h View 3 chunks +10 lines, -2 lines 0 comments Download
M components/network_hints/renderer/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M components/network_hints/renderer/prescient_networking_dispatcher.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M components/network_hints/renderer/prescient_networking_dispatcher.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M components/network_hints/renderer/renderer_dns_prefetch.cc View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
A components/network_hints/renderer/renderer_preconnect.h View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
A components/network_hints/renderer/renderer_preconnect.cc View 1 2 3 1 chunk +60 lines, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 26 (10 generated)
Pat Meenan
mmenke, ttuttle: PTAL at the network_hints component plumbing into the predictor. mkwst: PTAL at the ...
5 years, 10 months ago (2015-02-06 17:53:39 UTC) #3
Mike West
IPC rename LGTM.
5 years, 10 months ago (2015-02-07 04:40:50 UTC) #4
Deprecated (see juliatuttle)
LGTM. Predictor plumbing looks reasonable, but I'm not intimately familiar with the predictor myself. https://codereview.chromium.org/899883004/diff/20001/chrome/browser/renderer_host/chrome_render_message_filter.cc ...
5 years, 10 months ago (2015-02-10 17:48:42 UTC) #6
Nico
my files lgtm (somewhat stampy)
5 years, 10 months ago (2015-02-10 17:52:49 UTC) #7
mmenke
https://codereview.chromium.org/899883004/diff/20001/chrome/browser/renderer_host/chrome_render_message_filter.cc File chrome/browser/renderer_host/chrome_render_message_filter.cc (right): https://codereview.chromium.org/899883004/diff/20001/chrome/browser/renderer_host/chrome_render_message_filter.cc#newcode118 chrome/browser/renderer_host/chrome_render_message_filter.cc:118: else if (count > 6) On 2015/02/10 17:48:42, ttuttle ...
5 years, 10 months ago (2015-02-10 17:57:25 UTC) #8
mmenke
https://codereview.chromium.org/899883004/diff/20001/components/network_hints/renderer/prescient_networking_dispatcher.h File components/network_hints/renderer/prescient_networking_dispatcher.h (right): https://codereview.chromium.org/899883004/diff/20001/components/network_hints/renderer/prescient_networking_dispatcher.h#newcode27 components/network_hints/renderer/prescient_networking_dispatcher.h:27: network_hints::RendererPreconnect preconnect_; Remove extra space https://codereview.chromium.org/899883004/diff/20001/components/network_hints/renderer/renderer_preconnect.cc File components/network_hints/renderer/renderer_preconnect.cc (right): ...
5 years, 10 months ago (2015-02-10 18:10:14 UTC) #9
Pat Meenan
https://codereview.chromium.org/899883004/diff/20001/chrome/browser/renderer_host/chrome_render_message_filter.cc File chrome/browser/renderer_host/chrome_render_message_filter.cc (right): https://codereview.chromium.org/899883004/diff/20001/chrome/browser/renderer_host/chrome_render_message_filter.cc#newcode117 chrome/browser/renderer_host/chrome_render_message_filter.cc:117: count = 1; On 2015/02/10 17:48:42, ttuttle wrote: > ...
5 years, 10 months ago (2015-02-10 18:44:50 UTC) #11
mmenke
LGTM, modulo nit https://codereview.chromium.org/899883004/diff/40001/components/network_hints/renderer/renderer_preconnect.cc File components/network_hints/renderer/renderer_preconnect.cc (right): https://codereview.chromium.org/899883004/diff/40001/components/network_hints/renderer/renderer_preconnect.cc#newcode53 components/network_hints/renderer/renderer_preconnect.cc:53: for (const auto &entry: url_request_count_map_) { ...
5 years, 10 months ago (2015-02-10 18:49:59 UTC) #12
Pat Meenan
https://codereview.chromium.org/899883004/diff/40001/components/network_hints/renderer/renderer_preconnect.cc File components/network_hints/renderer/renderer_preconnect.cc (right): https://codereview.chromium.org/899883004/diff/40001/components/network_hints/renderer/renderer_preconnect.cc#newcode53 components/network_hints/renderer/renderer_preconnect.cc:53: for (const auto &entry: url_request_count_map_) { On 2015/02/10 18:49:59, ...
5 years, 10 months ago (2015-02-10 19:05:37 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/899883004/60001
5 years, 10 months ago (2015-02-10 20:23:57 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ng/builds/9330)
5 years, 10 months ago (2015-02-10 20:31:33 UTC) #18
Pat Meenan
jam@ could you PTAL at the new DEPS file for the network_hints component (ipc/ and ...
5 years, 10 months ago (2015-02-10 21:07:47 UTC) #21
jam
On 2015/02/10 21:07:47, Pat Meenan wrote: > jam@ could you PTAL at the new DEPS ...
5 years, 10 months ago (2015-02-11 17:02:22 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/899883004/60001
5 years, 10 months ago (2015-02-11 17:03:27 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 10 months ago (2015-02-11 17:08:18 UTC) #25
commit-bot: I haz the power
5 years, 10 months ago (2015-02-11 17:08:59 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ec1939d34edef32fbda9e2a6d3722749e343f5a8
Cr-Commit-Position: refs/heads/master@{#315782}

Powered by Google App Engine
This is Rietveld 408576698