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

Issue 24451003: Client Hints (Closed)

Created:
7 years, 3 months ago by bengr
Modified:
7 years, 2 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Client Hints Client Hints can be used as input to proactive content negotiation; just as the Accept header allowed clients to indicate what formats they prefer, Client Hints allow clients to indicate a list of device and agent specific preferences. See: https://github.com/igrigorik/http-client-hints/blob/draft2/draft-grigorik-http-client-hints-01.txt Patched from https://codereview.chromium.org/23654014/, which was patched from https://codereview.chromium.org/11970002 BUG=170388 CONTRIBUTOR=yoav@yoav.ws Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=225425 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227178

Patch Set 1 #

Total comments: 16

Patch Set 2 : Addressed comments #

Total comments: 10

Patch Set 3 : Addressed comments from mmenke #

Total comments: 10

Patch Set 4 : Addressed final comments #

Total comments: 1

Patch Set 5 : Used ScopedLocale #

Total comments: 2

Patch Set 6 : Removed entire locale test on Android and iOS #

Total comments: 2

Patch Set 7 : Fixed nit and use ScopedLocale with posix only #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -0 lines) Patch
M AUTHORS View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/io_thread.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 3 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 6 3 chunks +12 lines, -0 lines 0 comments Download
A chrome/browser/net/client_hints.h View 1 2 3 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/net/client_hints.cc View 1 2 3 1 chunk +70 lines, -0 lines 1 comment Download
A chrome/browser/net/client_hints_unittest.cc View 1 2 3 4 5 6 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
bengr
This CL replaces my last one on Client Hints. The only real changes are to ...
7 years, 3 months ago (2013-09-24 22:47:18 UTC) #1
Lei Zhang
lg with mmenke's approval. https://codereview.chromium.org/24451003/diff/1/AUTHORS File AUTHORS (right): https://codereview.chromium.org/24451003/diff/1/AUTHORS#newcode289 AUTHORS:289: Yoav Weiss <yoav@yoav.ws> W before ...
7 years, 3 months ago (2013-09-24 23:04:44 UTC) #2
mmenke
https://codereview.chromium.org/24451003/diff/1/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/24451003/diff/1/chrome/browser/net/chrome_network_delegate.cc#newcode84 chrome/browser/net/chrome_network_delegate.cc:84: const char kClientHintsDevicePixelRatioHeader[] = "CH-DPR"; optional: This may make ...
7 years, 2 months ago (2013-09-25 16:26:19 UTC) #3
bengr
https://codereview.chromium.org/24451003/diff/1/AUTHORS File AUTHORS (right): https://codereview.chromium.org/24451003/diff/1/AUTHORS#newcode289 AUTHORS:289: Yoav Weiss <yoav@yoav.ws> On 2013/09/24 23:04:44, Lei Zhang wrote: ...
7 years, 2 months ago (2013-09-25 17:25:51 UTC) #4
mmenke
https://codereview.chromium.org/24451003/diff/11001/chrome/browser/net/client_hints.cc File chrome/browser/net/client_hints.cc (right): https://codereview.chromium.org/24451003/diff/11001/chrome/browser/net/client_hints.cc#newcode12 chrome/browser/net/client_hints.cc:12: #include "ui/gfx/screen.h" nit: #include "base/task_runner_util.h" https://codereview.chromium.org/24451003/diff/11001/chrome/browser/net/client_hints.cc#newcode63 chrome/browser/net/client_hints.cc:63: it != ...
7 years, 2 months ago (2013-09-25 17:37:39 UTC) #5
bengr
https://codereview.chromium.org/24451003/diff/11001/chrome/browser/net/client_hints.cc File chrome/browser/net/client_hints.cc (right): https://codereview.chromium.org/24451003/diff/11001/chrome/browser/net/client_hints.cc#newcode12 chrome/browser/net/client_hints.cc:12: #include "ui/gfx/screen.h" On 2013/09/25 17:37:40, mmenke wrote: > nit: ...
7 years, 2 months ago (2013-09-25 20:04:12 UTC) #6
mmenke
LGTM https://codereview.chromium.org/24451003/diff/34001/chrome/browser/net/client_hints.h File chrome/browser/net/client_hints.h (right): https://codereview.chromium.org/24451003/diff/34001/chrome/browser/net/client_hints.h#newcode31 chrome/browser/net/client_hints.h:31: bool RetrieveScreenInfo(); nit: Since nothing inherits from ClientHints, ...
7 years, 2 months ago (2013-09-25 20:07:48 UTC) #7
Lei Zhang
lgtm with some nits https://codereview.chromium.org/24451003/diff/34001/chrome/browser/net/chrome_network_delegate.h File chrome/browser/net/chrome_network_delegate.h (right): https://codereview.chromium.org/24451003/diff/34001/chrome/browser/net/chrome_network_delegate.h#newcode19 chrome/browser/net/chrome_network_delegate.h:19: class ClientHints; nit: alphabetical order ...
7 years, 2 months ago (2013-09-25 20:36:32 UTC) #8
bengr
https://codereview.chromium.org/24451003/diff/34001/chrome/browser/net/chrome_network_delegate.h File chrome/browser/net/chrome_network_delegate.h (right): https://codereview.chromium.org/24451003/diff/34001/chrome/browser/net/chrome_network_delegate.h#newcode19 chrome/browser/net/chrome_network_delegate.h:19: class ClientHints; On 2013/09/25 20:36:32, Lei Zhang wrote: > ...
7 years, 2 months ago (2013-09-25 21:39:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bengr@chromium.org/24451003/41001
7 years, 2 months ago (2013-09-25 21:50:21 UTC) #10
commit-bot: I haz the power
Change committed as 225425
7 years, 2 months ago (2013-09-26 09:43:31 UTC) #11
Avi (use Gerrit)
https://codereview.chromium.org/24451003/diff/41001/chrome/browser/net/client_hints_unittest.cc File chrome/browser/net/client_hints_unittest.cc (right): https://codereview.chromium.org/24451003/diff/41001/chrome/browser/net/client_hints_unittest.cc#newcode29 chrome/browser/net/client_hints_unittest.cc:29: setlocale(LC_ALL, "fr_FR.UTF-8"); Nooooo. Please don't set a locale and ...
7 years, 2 months ago (2013-09-26 19:21:25 UTC) #12
groby-ooo-7-16
See base::test::ScopedLocale for locale handling :)
7 years, 2 months ago (2013-09-26 19:25:04 UTC) #13
Avi (use Gerrit)
On 2013/09/26 19:21:25, Avi wrote: > https://codereview.chromium.org/24451003/diff/41001/chrome/browser/net/client_hints_unittest.cc > File chrome/browser/net/client_hints_unittest.cc (right): > > https://codereview.chromium.org/24451003/diff/41001/chrome/browser/net/client_hints_unittest.cc#newcode29 > ...
7 years, 2 months ago (2013-09-26 19:44:04 UTC) #14
Avi (use Gerrit)
On 2013/09/26 19:44:04, Avi wrote: > On 2013/09/26 19:21:25, Avi wrote: > > > https://codereview.chromium.org/24451003/diff/41001/chrome/browser/net/client_hints_unittest.cc ...
7 years, 2 months ago (2013-09-26 19:44:35 UTC) #15
Avi (use Gerrit)
BTW, this also breaks android: http://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/14810/steps/unit_tests/logs/stdio [----------] 1 test from ClientHintsTest [ RUN ] ClientHintsTest.HintsWellFormattedWithNonEnLocale ...
7 years, 2 months ago (2013-09-26 21:17:53 UTC) #16
mmenke
On 2013/09/26 21:17:53, Avi wrote: > BTW, this also breaks android: > > http://build.chromium.org/p/chromium.linux/builders/Android%2520Tests%2520%2528dbg%2529/builds/14810/steps/unit_tests/logs/stdio > ...
7 years, 2 months ago (2013-09-26 21:30:17 UTC) #17
Avi (use Gerrit)
On 2013/09/26 21:30:17, mmenke wrote: > On 2013/09/26 21:17:53, Avi wrote: > > BTW, this ...
7 years, 2 months ago (2013-09-26 21:34:31 UTC) #18
Lei Zhang
On 2013/09/26 21:30:17, mmenke wrote: > Hmm... Why did this work on the trybots, but ...
7 years, 2 months ago (2013-09-26 21:51:38 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bengr@chromium.org/24451003/75001
7 years, 2 months ago (2013-09-30 17:33:21 UTC) #20
Avi (use Gerrit)
https://codereview.chromium.org/24451003/diff/75001/chrome/browser/net/client_hints_unittest.cc File chrome/browser/net/client_hints_unittest.cc (right): https://codereview.chromium.org/24451003/diff/75001/chrome/browser/net/client_hints_unittest.cc#newcode33 chrome/browser/net/client_hints_unittest.cc:33: // Android and iOS do not support setLocal. Without ...
7 years, 2 months ago (2013-09-30 17:35:55 UTC) #21
Avi (use Gerrit)
On 2013/09/30 17:35:55, Avi wrote: > https://codereview.chromium.org/24451003/diff/75001/chrome/browser/net/client_hints_unittest.cc > File chrome/browser/net/client_hints_unittest.cc (right): > > https://codereview.chromium.org/24451003/diff/75001/chrome/browser/net/client_hints_unittest.cc#newcode33 > ...
7 years, 2 months ago (2013-09-30 17:37:48 UTC) #22
bengr
On 2013/09/30 17:37:48, Avi wrote: > On 2013/09/30 17:35:55, Avi wrote: > > > https://codereview.chromium.org/24451003/diff/75001/chrome/browser/net/client_hints_unittest.cc ...
7 years, 2 months ago (2013-09-30 17:42:12 UTC) #23
bengr
https://codereview.chromium.org/24451003/diff/75001/chrome/browser/net/client_hints_unittest.cc File chrome/browser/net/client_hints_unittest.cc (right): https://codereview.chromium.org/24451003/diff/75001/chrome/browser/net/client_hints_unittest.cc#newcode33 chrome/browser/net/client_hints_unittest.cc:33: // Android and iOS do not support setLocal. On ...
7 years, 2 months ago (2013-09-30 17:42:22 UTC) #24
groby-ooo-7-16
>FYI, when I tried this fix earlier (https://codereview.chromium.org/24809002) I failed on the Windows bots linking ...
7 years, 2 months ago (2013-09-30 17:54:24 UTC) #25
Avi (use Gerrit)
On 2013/09/30 17:54:24, groby wrote: > >FYI, when I tried this fix earlier (https://codereview.chromium.org/24809002) I ...
7 years, 2 months ago (2013-09-30 18:15:29 UTC) #26
Avi (use Gerrit)
https://codereview.chromium.org/24451003/diff/83001/chrome/browser/net/client_hints_unittest.cc File chrome/browser/net/client_hints_unittest.cc (right): https://codereview.chromium.org/24451003/diff/83001/chrome/browser/net/client_hints_unittest.cc#newcode33 chrome/browser/net/client_hints_unittest.cc:33: // Android and iOS do not support setLocal. Move ...
7 years, 2 months ago (2013-09-30 18:16:15 UTC) #27
bengr
https://codereview.chromium.org/24451003/diff/83001/chrome/browser/net/client_hints_unittest.cc File chrome/browser/net/client_hints_unittest.cc (right): https://codereview.chromium.org/24451003/diff/83001/chrome/browser/net/client_hints_unittest.cc#newcode33 chrome/browser/net/client_hints_unittest.cc:33: // Android and iOS do not support setLocal. On ...
7 years, 2 months ago (2013-10-04 21:27:23 UTC) #28
Avi (use Gerrit)
SLGTM; give it a try. https://codereview.chromium.org/24451003/diff/93001/chrome/browser/net/client_hints.cc File chrome/browser/net/client_hints.cc (right): https://codereview.chromium.org/24451003/diff/93001/chrome/browser/net/client_hints.cc#newcode66 chrome/browser/net/client_hints.cc:66: *it = '.'; :( ...
7 years, 2 months ago (2013-10-04 21:59:01 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bengr@chromium.org/24451003/93001
7 years, 2 months ago (2013-10-04 22:17:27 UTC) #30
commit-bot: I haz the power
Change committed as 227178
7 years, 2 months ago (2013-10-05 05:07:25 UTC) #31
cbiesinger
7 years, 2 months ago (2013-10-24 00:02:30 UTC) #32
Message was sent while issue was closed.
On 2013/10/05 05:07:25, I haz the power (commit-bot) wrote:
> Change committed as 227178

So out of curiosity, why is this implemented in browser/ instead of on the blink
side? Parts of this will have to be implemented on blink, and it's awkward to
have it split up like that :/

(I need to figure out how to access the command-line switch from blink, which
may not be possible, being a different process and all...)

Powered by Google App Engine
This is Rietveld 408576698