New issue
Advanced search Search tips

Issue 852484 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 11
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Handle Accept-CH-Lifetime opt-in provided via http meta-accept equiv

Project Member Reported by tbansal@chromium.org, Jun 13 2018

Issue description

Currently, Chromium honors the Accept-CH-Lifetime only as part of main frame response headers. However, we should also provide the ability for origins to specify A-C-L opt-in as http meta-accept equiv, and honor this. 

This would be similar to how Accept-CH opt-in can be specified via either HTTP response headers or meta-accept equiv.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 27 2018

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

commit ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Jun 27 05:05:29 2018

Enable persistent client hint feature by default

This simplifies the code a bit.

This has been enabled in-code as a "stable" setting since M-67
which has now hit the stable channel.

Change-Id: I8cfed718113bb990087e004f6c7d667a0b5d30ce
Bug:  852484 
Reviewed-on: https://chromium-review.googlesource.com/1116077
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570664}
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/public/platform/web_runtime_features.h
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/renderer/core/html/parser/html_preload_scanner_test.cc
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/renderer/core/loader/frame_fetch_context.cc
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/renderer/core/loader/frame_fetch_context_test.cc
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/renderer/platform/exported/web_runtime_features.cc
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/renderer/platform/loader/fetch/client_hints_preferences.cc
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/renderer/platform/loader/fetch/client_hints_preferences_test.cc
[modify] https://crrev.com/ea9b5b7daa1d3390b600f2efcaaa5ce3444bc244/third_party/blink/renderer/platform/runtime_enabled_features.json5

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 4

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

commit d12baebacc3cbabb5b1fccaccddc37df2ba7acc6
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Jul 04 06:29:59 2018

Refactor client hints preferences code.

This separates out the code for parsing
accept-ch and accept-cl-lifetime header.

This makes it easier to parse http-equiv
accept-cl-lifetime header which will be
added in the next CL.

Previously, when only accept-ch header was present, it
was handled using a different code path then when
both accept-ch and accept-cl-lifetime headers
are present.

This CL changes it to handle the two headers separately.
That also makes it possible to unify the two code paths.

Change-Id: I1013419a55360249718855677678356f8446ec11
Bug:  852484 
Reviewed-on: https://chromium-review.googlesource.com/1125083
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572495}
[modify] https://crrev.com/d12baebacc3cbabb5b1fccaccddc37df2ba7acc6/third_party/blink/renderer/core/loader/frame_fetch_context.cc
[modify] https://crrev.com/d12baebacc3cbabb5b1fccaccddc37df2ba7acc6/third_party/blink/renderer/core/loader/http_equiv.cc
[modify] https://crrev.com/d12baebacc3cbabb5b1fccaccddc37df2ba7acc6/third_party/blink/renderer/platform/loader/fetch/client_hints_preferences.cc
[modify] https://crrev.com/d12baebacc3cbabb5b1fccaccddc37df2ba7acc6/third_party/blink/renderer/platform/loader/fetch/client_hints_preferences.h
[modify] https://crrev.com/d12baebacc3cbabb5b1fccaccddc37df2ba7acc6/third_party/blink/renderer/platform/loader/fetch/client_hints_preferences_test.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 5

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

commit e678e315571b7f1b088f8a08a76f04570d21900c
Author: Tarun Bansal <tbansal@chromium.org>
Date: Thu Jul 05 05:06:59 2018

WPT tests for http-equiv Accept-CH-Lifetime

WPT tests are added for:
(i) When ACL http-equiv header is sent by a same-origin iframe.
(ii) When ACL http-equiv header is sent by a cross-origin iframe.
(iii) When ACL http-equiv header is sent by a subresource.
(iv) When ACL http-equiv header is sent on the main frame.

Change-Id: Ie4adce0c1b5983a66ce3dce7bb6b77e30f63c03a
Bug:  852484 
Reviewed-on: https://chromium-review.googlesource.com/1125212
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572706}
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch.tentative.https.html
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime.tentative.https.html
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime_cross_origin_iframe.tentative.sub.https.html
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime_same_origin_iframe.tentative.https.html
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/accept_ch_lifetime_subresource.tentative.https.html
[add] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch_lifetime.tentative.https.html
[add] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch_lifetime_cross_origin_iframe.tentative.sub.https.html
[add] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch_lifetime_same_origin_iframe.tentative.https.html
[add] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/http_equiv_accept_ch_lifetime_subresource.tentative.https.html
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/do_not_expect_client_hints_headers.html
[modify] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/expect_client_hints_headers.html
[add] https://crrev.com/e678e315571b7f1b088f8a08a76f04570d21900c/third_party/WebKit/LayoutTests/external/wpt/client-hints/resources/http_equiv_accept_ch_lifetime.html

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 10

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

commit 9a7051fce154531bb7f1aa2fb365e091f347fed1
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Jul 10 18:30:05 2018

Parse Accept-CH-Lifetime http-equiv header.

Parse the Accept-CH-Lifetime header when supplied as http-equiv.
The client hints opted in by the origin are persisted on the disk.

Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: I239a3347e9283aa9c10890f073ca598b3f484fa6
Bug:  852484 
Reviewed-on: https://chromium-review.googlesource.com/1127462
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Cr-Commit-Position: refs/heads/master@{#573821}
[modify] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/chrome/browser/client_hints/client_hints_browsertest.cc
[add] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/chrome/test/data/client_hints/http_equiv_accept_ch_with_lifetime.html
[add] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/chrome/test/data/client_hints/http_equiv_accept_ch_without_lifetime.html
[add] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/chrome/test/data/client_hints/http_equiv_accept_ch_without_lifetime_img_localhost.html
[add] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/chrome/test/data/client_hints/http_equiv_accept_ch_without_lifetime_with_iframe.html
[add] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/chrome/test/data/client_hints/http_equiv_accept_ch_without_lifetime_with_subresource.html
[add] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/chrome/test/data/client_hints/http_equiv_accept_ch_without_lifetime_with_subresource_iframe.html
[modify] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
[modify] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/third_party/blink/public/platform/web_feature.mojom
[modify] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/third_party/blink/renderer/core/loader/http_equiv.cc
[modify] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/third_party/blink/renderer/core/loader/http_equiv.h
[modify] https://crrev.com/9a7051fce154531bb7f1aa2fb365e091f347fed1/tools/metrics/histograms/enums.xml

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 11

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

commit 00540e1c0f98c5a3b3563b18d097d4265d18d69c
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Jul 11 06:51:13 2018

Fix the sequence number of client hints web feature

Bug:  852484 
Change-Id: I4b62bc03266d9e754e01cb7983d841635d9a347b
Reviewed-on: https://chromium-review.googlesource.com/1132689
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574093}
[modify] https://crrev.com/00540e1c0f98c5a3b3563b18d097d4265d18d69c/third_party/blink/public/platform/web_feature.mojom
[modify] https://crrev.com/00540e1c0f98c5a3b3563b18d097d4265d18d69c/tools/metrics/histograms/enums.xml

Status: Fixed (was: Assigned)

Sign in to add a comment