New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 821027 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jul 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug
Proj-Servicification

Blocking:
issue 598073
issue 809583



Sign in to add a comment

Need an API to preconnect urls for network service

Project Member Reported by xunji...@chromium.org, Mar 12 2018

Issue description

chrome/browser/net/predictor.cc uses net::HttpStreamFactory::PreconnectStreams to preconnect urls.

We need to expose an API from network service for predictor to do this.
 
Summary: Need an API to preconnect urls for network service (was: Need a API to preconnect urls for network service)
Cc: alexilin@chromium.org mmenke@chromium.org
+alexilin@: FYI. Let me know if this is being worked on.
Blocking: 809583
Blocking: 598073

Comment 5 by dxie@chromium.org, May 15 2018

Labels: -Pri-3 Proj-Servicification-Canary Pri-2

Comment 6 by mef@chromium.org, Jun 7 2018

Owner: lilyhoughton@chromium.org
Status: Assigned (was: Available)

Comment 7 by dxie@chromium.org, Jun 8 2018

Labels: OS-Chrome OS-Windows OS-Mac OS-Linux

Comment 8 by mmenke@chromium.org, Jun 26 2018

Looks like we'll need to make the API we expose here also support HSTS.  I think it's as simple as moving Predictor::GetHSTSRedirectOnIOThread into the network service, and always calling it in the predictor method, and then removing the call from the predictor.  This will make potentially the predictor less accurate in the case of HSTS redirects:  If we have 3 HTTP requests that will be upgraded, and 3 HTTPS requests to the same server, we'll potentially only learn to preconnect 3 HTTP sockets and 3 HTTPS ones.  Since each preconnect takes existing preconnects into a account, we'll then only preconnect 3 sockets total to the server, instead of the current six, but I think we can live with that.  The predictor is also going to be replaced, at some point, anyways.
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/900ceec60a9510de107b513e4a4ea0fa6f117ddd

commit 900ceec60a9510de107b513e4a4ea0fa6f117ddd
Author: Lily Houghton <lilyhoughton@chromium.org>
Date: Wed Jul 11 06:59:44 2018

Change the Predictor class use the Preconnect API from the NetworkService

Bug:  821027 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I597a7ee5d5cd423474232dc3d996055b0962dc60
Reviewed-on: https://chromium-review.googlesource.com/1104800
Commit-Queue: Lily Houghton <lilyhoughton@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Helen Li <xunjieli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574096}
[modify] https://crrev.com/900ceec60a9510de107b513e4a4ea0fa6f117ddd/chrome/browser/net/predictor.cc
[modify] https://crrev.com/900ceec60a9510de107b513e4a4ea0fa6f117ddd/chrome/browser/net/predictor.h
[modify] https://crrev.com/900ceec60a9510de107b513e4a4ea0fa6f117ddd/chrome/browser/profiles/profile_impl_io_data.cc

Labels: -Pri-2 Pri-1
Am I right that NetworkService's preconnect API is ready for use? There is another predictor implementation that should be converted. I'm ready to create a patch if nobody is already working on it.
Correct, Lily hooked it up and it is ready for use in production code (And it works with both the network service enabled and disabled).
lily, is this fixed? anything else blocked on this?
The API exists, mod the fact that I don't think anything has been done yet to support HSTS per #8
Project Member

Comment 15 by bugdroid1@chromium.org, Jul 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/612af1b608d676088101bafbe1d8f9b0f449c0ec

commit 612af1b608d676088101bafbe1d8f9b0f449c0ec
Author: Lily Houghton <lilyhoughton@chromium.org>
Date: Tue Jul 31 19:03:26 2018

Move predictor HSTS redirection to NetworkService

This CL moves the HSTS redirection call in the predictor's preconnect
method into the NetworkService (creating an internal analogue to
GetHSTSRedirectOnIOThread).

Bug:  821027 
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I5070de29aa219d2c038634c584b15c2a714a128f
Reviewed-on: https://chromium-review.googlesource.com/1152082
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Lily Houghton <lilyhoughton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579510}
[modify] https://crrev.com/612af1b608d676088101bafbe1d8f9b0f449c0ec/chrome/browser/net/predictor.cc
[modify] https://crrev.com/612af1b608d676088101bafbe1d8f9b0f449c0ec/chrome/browser/net/predictor_unittest.cc
[modify] https://crrev.com/612af1b608d676088101bafbe1d8f9b0f449c0ec/services/network/network_context.cc
[modify] https://crrev.com/612af1b608d676088101bafbe1d8f9b0f449c0ec/services/network/network_context.h
[modify] https://crrev.com/612af1b608d676088101bafbe1d8f9b0f449c0ec/services/network/network_context_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment