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

Issue 735518 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Task


Sign in to add a comment

Support Accept-CH-Lifetime header for client hints

Project Member Reported by tbansal@chromium.org, Jun 21 2017

Issue description

Change description:
Client hints allow browsers to provide origins with device-specific configuration data in the HTTP request headers. The client hints spec was recently updated to enable origins to request the browser to remember an origin-wide Accept-CH support for a specified period of time using Accept-CH-Lifetime header.


Changes to API surface:
- Support for Accept-CH-Lifetime response header would be added.


Links:
Public standards discussion:
https://github.com/httpwg/http-extensions/issues/306
https://tools.ietf.org/html/draft-ietf-httpbis-client-hints-04#section-6.2
 
Blocking: 710702
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 30 2017

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

commit 08a0e3ee7ad01c643155daf1c95a70954fe05c00
Author: tbansal <tbansal@chromium.org>
Date: Fri Jun 30 21:30:08 2017

Store base::Value in ContentSettingPatternSource instead of an enum.

This makes it possible for the consumers of the content settings API to
store different types of information.

Additional mechanical change:
Move some of the methods from
content_settings/core/browser/content_settings_utils.h to
content_settings/core/common/content_settings_utils.h.
This makes it possible to access the moved methods from chrome/renderer.

BUG= 735518 
TBR=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2938163002
Cr-Commit-Position: refs/heads/master@{#483829}

[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/android/preferences/pref_service_bridge.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/android/preferences/website_preference_bridge.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/content_settings/content_settings_origin_identifier_value_map_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/content_settings/content_settings_supervised_provider_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/engagement/important_sites_util.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/engagement/site_engagement_service.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/extensions/api/content_settings/content_settings_store.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/extensions/api/content_settings/content_settings_store_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/extensions/extension_special_storage_policy.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/notifications/desktop_notification_profile_util_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/notifications/notification_channels_provider_android.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/notifications/notification_channels_provider_android_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/notifications/notification_interactive_uitest_support.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/plugins/plugin_utils.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/subresource_filter/subresource_filter_content_settings_manager_unittest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/ui/page_info/page_info.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/ui/webui/options/content_settings_handler.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/ui/webui/settings/site_settings_handler.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/browser/ui/webui/site_settings_helper.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/renderer/content_settings_observer.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/chrome/renderer/content_settings_observer_browsertest.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/browser/content_settings_default_provider.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/browser/content_settings_pref.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/browser/content_settings_utils.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/browser/content_settings_utils.h
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/browser/cookie_settings.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/browser/host_content_settings_map.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/BUILD.gn
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/DEPS
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/OWNERS
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/content_settings.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/content_settings.h
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/content_settings.mojom
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/content_settings_struct_traits.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/content_settings_struct_traits.h
[add] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/content_settings_utils.cc
[add] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/common/content_settings_utils.h
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/components/content_settings/core/test/content_settings_test_utils.cc
[modify] https://crrev.com/08a0e3ee7ad01c643155daf1c95a70954fe05c00/ios/chrome/browser/ui/settings/block_popups_collection_view_controller.mm

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 12 2017

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

commit 5426f7d0e007380b3ce7592dd959fb2b2ba4c080
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Jul 12 16:55:42 2017

Refactor the client hints preferences class

Store all client hints as enum values. This makes client hints
more structured. As a bonus, it reduces the chances of bugs by
adding compile-time checks, and makes it easier to introduce
new client hint values.

In forthcoming CLs, this structured list of client hints would be
persisted on the disk on the browser side.

Bug:  735518 
Change-Id: I5e743398ed1c3484def527543fabcfad99a0f14a
Reviewed-on: https://chromium-review.googlesource.com/563555
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485998}
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/core/loader/ImageLoader.cpp
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.cpp
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.h
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.cpp
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferencesTest.cpp
[modify] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/5426f7d0e007380b3ce7592dd959fb2b2ba4c080/third_party/WebKit/public/platform/WebClientHintsType.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 24 2017

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

commit eb5967670c75afe3b18faa691745d62342c7edfd
Author: Tarun Bansal <tbansal@chromium.org>
Date: Mon Jul 24 23:32:49 2017

Content Settings for client hints

Add content setting enum and rules for client hints.
Similar to image, JS, autoplay rules, client hint rules are added to
RendererContentSettingRules. This makes them accessible to the
renderers.

In the next few CLs, the renderers are going to query these rules
(on every resource load). Based on the query result, the renderer
would attach appropriate client hint headers to the resource
request.

Bug:  735518 
Change-Id: I59e74e66b6ee4bb23bc12dcd3213bb11bfdd4f63
Reviewed-on: https://chromium-review.googlesource.com/576729
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489140}
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/browser/content_settings_utils.cc
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/browser/website_settings_registry.cc
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/common/content_settings.cc
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/common/content_settings.h
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/common/content_settings.mojom
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/common/content_settings_struct_traits.cc
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/common/content_settings_struct_traits.h
[modify] https://crrev.com/eb5967670c75afe3b18faa691745d62342c7edfd/components/content_settings/core/common/content_settings_types.h

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 25 2017

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

commit 1aa152df791722837fe2e4873dfa36b5c239e1e4
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Jul 25 02:47:52 2017

Parse accept-ch-lifetime header.

Parse accept-ch-lifetime header. This header is parsed for every
loaded resource by the ResourceLoader.
The parsed client hints preferences are then
notified to WebContentSettingsClient, which effectively
notifies ContentSettingsObserver.

In the next few CLs, ContentSettingsObserver would notify the
persistent client hints to the browser side using mojo.
Also, in the next few CLs, at the start of every resource
load, Blink will query ContentSettingsObserver
for the client hints that have been persisted in the past for the
corresponding origin. Based on the results of this query,
Blink will add client hints to the resource request.

Bug:  735518 
Change-Id: I8d0dbe28d8acf9b5a8ed36c116e179c3e46a8d1d
Reviewed-on: https://chromium-review.googlesource.com/569178
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489198}
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/chrome/renderer/content_settings_observer.cc
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/chrome/renderer/content_settings_observer.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/core/frame/ContentSettingsClient.cpp
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/core/frame/ContentSettingsClient.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.cpp
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.cpp
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferencesTest.cpp
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/Source/platform/network/HTTPNames.json5
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/public/platform/WebClientHintsType.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/public/platform/WebContentSettingsClient.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/public/platform/WebRuntimeFeatures.h
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/1aa152df791722837fe2e4873dfa36b5c239e1e4/tools/metrics/histograms/enums.xml

Labels: -M-61 M-62
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 25 2017

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

commit 0b8b7afd55cead1395e4bebe1f45c75db70b1523
Author: Tarun Bansal <tbansal@chromium.org>
Date: Fri Aug 25 03:52:16 2017

mojo implementation for client hint update

Add the mojo interface that enables renderers to push client
hints updates to the browser.

Bug:  735518 
Change-Id: Idb9e5c4a5a7aa2198f1790d13e37cb12d38d78f4
Reviewed-on: https://chromium-review.googlesource.com/588288
Reviewed-by: Nick Carter <nick@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497315}
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/browser/BUILD.gn
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/browser/client_hints/OWNERS
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/browser/client_hints/client_hints_browsertest.cc
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/browser/client_hints/client_hints_observer.cc
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/browser/client_hints/client_hints_observer.h
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/browser/ui/tab_helpers.cc
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/common/BUILD.gn
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/common/DEPS
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/common/client_hints.mojom
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/renderer/content_settings_observer.cc
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/test/BUILD.gn
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/test/data/client_hints/client_hints_lifetime.html
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/test/data/client_hints/client_hints_lifetime.html.mock-http-headers
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/test/data/client_hints/no_client_hints_lifetime.html
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/chrome/test/data/client_hints/no_client_hints_lifetime.html.mock-http-headers
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/content/public/renderer/render_frame_observer.h
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/core/html/parser/HTMLPreloadScannerTest.cpp
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/core/loader/ImageLoader.cpp
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.cpp
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/core/loader/private/FrameClientHintsPreferencesContext.h
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.cpp
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferences.h
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/Source/platform/loader/fetch/ClientHintsPreferencesTest.cpp
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/public/BUILD.gn
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/public/platform/WebClientHintsType.h
[add] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/third_party/WebKit/public/platform/web_client_hints_types.mojom
[modify] https://crrev.com/0b8b7afd55cead1395e4bebe1f45c75db70b1523/tools/metrics/histograms/histograms.xml

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 30 2017

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

commit 3f36c857ef8c6428d431eb13336a29fd7d3cc043
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Aug 30 06:28:40 2017

Allow website settings to have arbitrary values

Allow arbitrary base::Value to be read for entries in website settings
registry.

Before this, only entries in the content settings registry were allowed
to have an arbitrary base::Value.

Bug:  735518 
Change-Id: I11dad607c0adec5eb6d89b4967399da1d081c557
Reviewed-on: https://chromium-review.googlesource.com/639894
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498380}
[modify] https://crrev.com/3f36c857ef8c6428d431eb13336a29fd7d3cc043/chrome/browser/content_settings/host_content_settings_map_unittest.cc
[modify] https://crrev.com/3f36c857ef8c6428d431eb13336a29fd7d3cc043/components/content_settings/core/browser/host_content_settings_map.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Aug 30 2017

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

commit 9090226ebabcc77f67a1bae555dd84e74d5f580b
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Aug 30 16:10:40 2017

Delete client hints when cookies are cleared

The persisted client hints are cleared if the cookies are deleted.

Bug:  735518 
Change-Id: I34efc9142cb075469bf4a186a37a2fd0d27c00bb
Reviewed-on: https://chromium-review.googlesource.com/634204
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498482}
[modify] https://crrev.com/9090226ebabcc77f67a1bae555dd84e74d5f580b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
[modify] https://crrev.com/9090226ebabcc77f67a1bae555dd84e74d5f580b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Aug 30 2017

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

commit 86edcbda83cd9942dde3c70b4de352c2bb96f77f
Author: Anthony Vallee-Dubois <anthonyvd@chromium.org>
Date: Wed Aug 30 17:57:34 2017

Revert "Delete client hints when cookies are cleared"

This reverts commit 9090226ebabcc77f67a1bae555dd84e74d5f580b.

Reason for revert: This is causing failures on Mac and Win bots: https://uberchromegw.corp.google.com/i/chromium.win/builders/Win%207%20Tests%20x64%20%281%29/builds/28227, https://uberchromegw.corp.google.com/i/chromium.mac/builders/Mac10.10%20Tests/builds/22996

Original change's description:
> Delete client hints when cookies are cleared
> 
> The persisted client hints are cleared if the cookies are deleted.
> 
> Bug:  735518 
> Change-Id: I34efc9142cb075469bf4a186a37a2fd0d27c00bb
> Reviewed-on: https://chromium-review.googlesource.com/634204
> Reviewed-by: Martin Šrámek <msramek@chromium.org>
> Commit-Queue: Tarun Bansal <tbansal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#498482}

TBR=msramek@chromium.org,tbansal@chromium.org

Change-Id: I9a0a9d27eb2bfa80386f3aeb39d9e2ff9e14563b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  735518 
Reviewed-on: https://chromium-review.googlesource.com/644046
Reviewed-by: Anthony Vallee-Dubois <anthonyvd@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Anthony Vallee-Dubois <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498532}
[modify] https://crrev.com/86edcbda83cd9942dde3c70b4de352c2bb96f77f/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
[modify] https://crrev.com/86edcbda83cd9942dde3c70b4de352c2bb96f77f/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Aug 30 2017

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

commit ace6d7458bffa460820211abaf45fe905b95f050
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Aug 30 22:50:43 2017

Delete client hints when cookies are cleared

The persisted client hints are cleared if the cookies are deleted.

Bug:  735518 
TBR: msramek@chromium.org
Change-Id: I92fece3aaef048fd3ff5fb88cd8020162f695fbc
Reviewed-on: https://chromium-review.googlesource.com/644126
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498652}
[modify] https://crrev.com/ace6d7458bffa460820211abaf45fe905b95f050/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
[modify] https://crrev.com/ace6d7458bffa460820211abaf45fe905b95f050/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc

Labels: -M-62 M-63
Project Member

Comment 15 by bugdroid1@chromium.org, Sep 7 2017

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

commit 1965b04881fffc3aceb2e117651b8582ab08fbf6
Author: Tarun Bansal <tbansal@chromium.org>
Date: Thu Sep 07 04:59:19 2017

Add client hints to the request headers if they were persisted in the past

Renderer now reads the persisted client hints from the provided
rules. The renderer is queried by the Blink to determine the
appropriate client hint headers to attach.

Bug:  735518 
Change-Id: Iaad4c22042ee5ff4ab73b9d4eb1620396e99ca08
Reviewed-on: https://chromium-review.googlesource.com/642750
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500216}
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/browser/client_hints/client_hints_browsertest.cc
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/renderer/content_settings_observer.cc
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/renderer/content_settings_observer.h
[rename] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/test/data/client_hints/accept_ch_with_lifetime.html
[rename] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/test/data/client_hints/accept_ch_with_lifetime.html.mock-http-headers
[copy] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/test/data/client_hints/accept_ch_without_lifetime.html
[add] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/test/data/client_hints/accept_ch_without_lifetime.html.mock-http-headers
[delete] https://crrev.com/c36a65e34ad09ee7537e095ca9acd7038e9b66fe/chrome/test/data/client_hints/no_client_hints_lifetime.html
[delete] https://crrev.com/c36a65e34ad09ee7537e095ca9acd7038e9b66fe/chrome/test/data/client_hints/no_client_hints_lifetime.html.mock-http-headers
[add] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/chrome/test/data/client_hints/without_accept_ch_without_lifetime.html
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/third_party/WebKit/Source/core/frame/ContentSettingsClient.cpp
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/third_party/WebKit/Source/core/frame/ContentSettingsClient.h
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/third_party/WebKit/Source/core/loader/FrameFetchContext.h
[modify] https://crrev.com/1965b04881fffc3aceb2e117651b8582ab08fbf6/third_party/WebKit/public/platform/WebContentSettingsClient.h

Blockedon: 764513
Labels: migrated-launch-owp Type-Task
This issue has been automatically relabelled type=task because type=launch-owp issues are now officially deprecated. The deprecation is because they were creating confusion about how to get launch approvals, which should be instead done via type=launch issues.

We recommend this issue be used for implementation tracking (for public visibility), but if you already have an issue for that, you may mark this as duplicate.

For more details see here: https://docs.google.com/document/d/1JA6RohjtZQc26bTrGoIE_bSXGXUDQz8vc6G0n_sZJ2o/edit

For any questions, please contact owencm, sshruthi, larforge
Components: Blink>Loader
Project Member

Comment 19 by bugdroid1@chromium.org, Oct 24 2017

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

commit a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Oct 24 23:53:05 2017

Disable writing and reading of persistent client hints if
JavaScript or cookies are disabled.

1. If JavaScript is disallowed for a origin, then client hints
preferences from that origin are not persisted to the disk.
Additionally, client hints are not attached to the
requests to that origin (for both browser and render
initiated requests).

2. If cookies are disallowed for a origin, then client hints
preferences from that origin are not persisted to the disk.
Additionally, client hints are not attached to the
requests to that origin (for both browser and render
initiated requests).

Bug:  735518 
Change-Id: I28f975a604a6945cb3408297242bbe1fa1e0e1b7
Reviewed-on: https://chromium-review.googlesource.com/699674
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511308}
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/chrome/browser/client_hints/client_hints.cc
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/chrome/browser/client_hints/client_hints.h
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/chrome/browser/client_hints/client_hints_browsertest.cc
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/chrome/browser/client_hints/client_hints_observer.cc
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/third_party/WebKit/LayoutTests/http/tests/permissionclient/image-permissions-expected.txt
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/third_party/WebKit/LayoutTests/permissionclient/image-permissions-expected.txt
[modify] https://crrev.com/a61f0f6f567d3adf8b6dcfa8c04293349f1e8c08/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Blockedon: 782381
Labels: -M-63 M-66
Blockedon: 809611
Project Member

Comment 23 by bugdroid1@chromium.org, Feb 7 2018

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

commit 8c3071834ae90ca3aa680154fd6e724f648cfc86
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Feb 07 06:07:33 2018

Fix the client hints device-memory header.

Ensure that device memory is initialized
when attaching it as a client hint header.

Bug:  735518 
Change-Id: I8aa3c35e7f783e8dde3f3a0bba094e532cf3de6b
Reviewed-on: https://chromium-review.googlesource.com/903485
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534929}
[modify] https://crrev.com/8c3071834ae90ca3aa680154fd6e724f648cfc86/chrome/browser/client_hints/client_hints.cc
[modify] https://crrev.com/8c3071834ae90ca3aa680154fd6e724f648cfc86/third_party/WebKit/common/device_memory/approximated_device_memory.cc

Project Member

Comment 24 by bugdroid1@chromium.org, Feb 9 2018

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

commit add5e181c71051d746370d2a017a7903c6b19b33
Author: Tarun Bansal <tbansal@chromium.org>
Date: Fri Feb 09 19:07:58 2018

Restrict persistent client hints to first party origins

With this CL, if an origin has provided persistent client hint
settings in the past, the persistent client hints would be
attached with
(i) Main frame request headers
(ii) Subresource request headers for subresources that have the
same origin as the document origin.

Before this CL, the client hints would have attached for subresource
origins as well (regardless of the opt-in of the document level
origin).

Discussion here of restricting client hints to first party origins only:
https://github.com/httpwg/http-extensions/issues/372#issuecomment-359038699

In the future, feature policy may be used by 1P origins to allow
attaching of client hints to 3P hosts.

Bug:  735518 
Change-Id: I74ba430bd5403b23535022ded87d24695be5bd70
Reviewed-on: https://chromium-review.googlesource.com/892486
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535776}
[modify] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/browser/client_hints/client_hints.cc
[modify] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/browser/client_hints/client_hints_browsertest.cc
[modify] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/common/client_hints/client_hints.cc
[modify] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/common/client_hints/client_hints.h
[modify] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/renderer/content_settings_observer.cc
[add] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/test/data/client_hints/accept_ch_without_lifetime_with_iframe.html
[add] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/test/data/client_hints/without_accept_ch_without_lifetime_img_foo_com.html
[add] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/chrome/test/data/client_hints/without_accept_ch_without_lifetime_img_localhost.html
[modify] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/add5e181c71051d746370d2a017a7903c6b19b33/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp

Blockedon: 816661
Blockedon: 817049
Blockedon: 820674
Project Member

Comment 28 by bugdroid1@chromium.org, Mar 14 2018

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

commit 10fd90d72723b89278645208b3fc0fb78aa722c3
Author: Tarun Bansal <tbansal@chromium.org>
Date: Wed Mar 14 00:32:28 2018

Fix the check for client hints count

The number of client hints requested by origin can be as high as
blink::mojom::WebClientHintsType::kLast + 1.

Bug:  735518 
Change-Id: I6b5f2552b1f55f01e9b9aff33ce1ff33af8f125c
Reviewed-on: https://chromium-review.googlesource.com/961539
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542967}
[modify] https://crrev.com/10fd90d72723b89278645208b3fc0fb78aa722c3/chrome/browser/client_hints/client_hints_observer.cc

Blockedon: 821954
Blockedon: 821974
Labels: -M-66 M-67
Status: Fixed (was: Started)
Project Member

Comment 33 by bugdroid1@chromium.org, Mar 19 2018

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

commit 62158e3ea5680211a69999dd5f00649248130c0d
Author: Raymes Khoury <raymes@chromium.org>
Date: Mon Mar 19 08:46:49 2018

Revert "Enable ClientHintsPersistent feature (Accept-CH-Lifetime header)."

This reverts commit 6af9df3e37f4ba34a5a5a44a5245bebce7485507.

Reason for revert: Caused a regression as outlined in
https://chromium-review.googlesource.com/c/chromium/src/+/957265#message-bfd66cb6916d1397f05a74dd7c1fca4645857147

Original change's description:
> Enable ClientHintsPersistent feature (Accept-CH-Lifetime header).
>
> blink-dev i2s thread: https://groups.google.com/a/chromium.org/d/topic/blink-dev/8RBFue7RMXQ/discussion
>
> Change-Id: I5595b3aed72ea0cece88948f69f480f5808fce6b
> Bug:  735518 , 782381 , 816661 
> TBR: raymes@chromium.org
> Reviewed-on: https://chromium-review.googlesource.com/957265
> Reviewed-by: Tarun Bansal <tbansal@chromium.org>
> Reviewed-by: David Dorwin <ddorwin@chromium.org>
> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
> Commit-Queue: Tarun Bansal <tbansal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#543786}

TBR=ddorwin@chromium.org,raymes@chromium.org,kinuko@chromium.org,tbansal@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  735518 ,  782381 ,  816661 
Change-Id: I47c42057e7d3158eeb515b993266ce0ff8e937e7
Reviewed-on: https://chromium-review.googlesource.com/968081
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543992}
[modify] https://crrev.com/62158e3ea5680211a69999dd5f00649248130c0d/chrome/browser/client_hints/client_hints_browsertest.cc
[modify] https://crrev.com/62158e3ea5680211a69999dd5f00649248130c0d/chrome/browser/content_settings/content_settings_browsertest.cc
[modify] https://crrev.com/62158e3ea5680211a69999dd5f00649248130c0d/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Project Member

Comment 34 by bugdroid1@chromium.org, Mar 20 2018

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

commit 593790112b293faaabc0f692ffe225ab91c6018e
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Mar 20 04:53:34 2018

Enable ClientHintsPersistent feature (Accept-CH-Lifetime header).

blink-dev i2s thread: https://groups.google.com/a/chromium.org/d/topic/blink-dev/8RBFue7RMXQ/discussion

Bug:  735518 , 782381 , 816661 
Change-Id: Ic7c8a6a0eaf323d3ab736ac8e3ad2d23104ae0cb
Reviewed-on: https://chromium-review.googlesource.com/969407
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544285}
[modify] https://crrev.com/593790112b293faaabc0f692ffe225ab91c6018e/chrome/browser/client_hints/client_hints_browsertest.cc
[modify] https://crrev.com/593790112b293faaabc0f692ffe225ab91c6018e/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Cc: arthurso...@chromium.org clamy@chromium.org mmenke@chromium.org
There is still on TODO associated with this bug.

~~~[chrome/browser/client_hints/client_hints.cc]~~~
  // TODO( crbug.com/735518 ): If the request is redirected, the client hint
  // headers stay attached to the redirected request. Consider removing/adding
  // the client hints headers if the request is redirected with a change in
  // scheme or a change in the origin.
~~~

tbansal@, could you check if this TODO is fixed.

Note: I am adding support for removing headers here:
https://chromium-review.googlesource.com/c/chromium/src/+/1369856
It looks like this is what this comment was waiting for. Maybe.
Issue 911952 is tracking that work. I still need to work in removing the client hints for redirected requests.

Sign in to add a comment