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

Issue 1802773002: Support loading trial tokens from HTTP headers. (Closed)

Created:
4 years, 9 months ago by Marijn Kruisselbrink
Modified:
4 years, 8 months ago
CC:
blink-reviews, chasej+watch_chromium.org, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, kinuko+watch, loading-reviews_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support loading trial tokens from HTTP headers. Adds support for the Origin-Trial header as specified in https://jpchase.github.io/OriginTrials/#header BUG=582045 Committed: https://crrev.com/7b6fa286a1a152601fe32fc988df4083986c0a2e Cr-Commit-Position: refs/heads/master@{#389569}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : trim whitespace after splitting header #

Patch Set 4 : rebase #

Total comments: 4

Patch Set 5 : rebase #

Patch Set 6 : make quoted strings as tokens work #

Total comments: 1

Patch Set 7 : rebase #

Patch Set 8 : Don't use //net for parsing headers #

Total comments: 13

Patch Set 9 : address comments #

Total comments: 2

Patch Set 10 : clarify comment #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-multiple-tokens-header.php View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 3 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp View 1 2 3 4 5 6 7 8 3 chunks +82 lines, -1 line 5 comments Download
M third_party/WebKit/Source/core/origin_trials/OriginTrialContextTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +56 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (13 generated)
Marijn Kruisselbrink
I'm not entirely happy with how I'm getting from FrameLoader to DocumentOriginTrialContext in this patch. ...
4 years, 9 months ago (2016-03-16 23:11:26 UTC) #3
Marijn Kruisselbrink
I rebased this on top of https://codereview.chromium.org/1833063002, which made the changes here a lot simpler.
4 years, 9 months ago (2016-03-25 19:09:13 UTC) #4
iclelland
https://codereview.chromium.org/1802773002/diff/60001/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl (right): https://codereview.chromium.org/1802773002/diff/60001/third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl#newcode34 third_party/WebKit/Source/build/scripts/templates/OriginTrials.cpp.tmpl:34: if (headerValue.isEmpty()) return; I don't know how much we ...
4 years, 8 months ago (2016-04-05 17:01:30 UTC) #5
Marijn Kruisselbrink
+esprehn: does exposing part of net::HttpUtil this way in blink platform/network/HTTPParsers.h seem at all reasonable? ...
4 years, 8 months ago (2016-04-05 23:57:00 UTC) #6
Marijn Kruisselbrink
Actually +esprehn this time: see my previous message; but basically I'm wondering if trying to ...
4 years, 8 months ago (2016-04-06 18:52:14 UTC) #9
iclelland
On 2016/04/06 18:52:14, Marijn Kruisselbrink wrote: > Actually +esprehn this time: see my previous message; ...
4 years, 8 months ago (2016-04-13 14:21:53 UTC) #10
iclelland
https://codereview.chromium.org/1802773002/diff/100001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp (right): https://codereview.chromium.org/1802773002/diff/100001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp#newcode58 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp:58: // Parse a Origin-Trial header as specified in nit: ...
4 years, 8 months ago (2016-04-13 14:22:05 UTC) #11
Marijn Kruisselbrink
After discussing this offline with esprehn, the conclusion was to not depend on //net for ...
4 years, 8 months ago (2016-04-20 21:01:52 UTC) #15
chasej
https://codereview.chromium.org/1802773002/diff/180001/third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php File third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php (right): https://codereview.chromium.org/1802773002/diff/180001/third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php#newcode5 third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php:5: header("Origin-Trial: 1|tZPW/JJ2Sxm4z7k/Eb1/upMsppozWpTwEuGwhgQko0zWS6ebvjQ+EXPP/ftoMX8/PCoDgOS3xlrXElMgDDvbCg==|http://127.0.0.1:8000|Frobulate|2000000000"); Probably stating the obvious, but this is ...
4 years, 8 months ago (2016-04-21 18:24:30 UTC) #17
Marijn Kruisselbrink
https://codereview.chromium.org/1802773002/diff/180001/third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php File third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php (right): https://codereview.chromium.org/1802773002/diff/180001/third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php#newcode5 third_party/WebKit/LayoutTests/http/tests/origin_trials/sample-api-enabled-header.php:5: header("Origin-Trial: 1|tZPW/JJ2Sxm4z7k/Eb1/upMsppozWpTwEuGwhgQko0zWS6ebvjQ+EXPP/ftoMX8/PCoDgOS3xlrXElMgDDvbCg==|http://127.0.0.1:8000|Frobulate|2000000000"); On 2016/04/21 at 18:24:29, chasej wrote: > ...
4 years, 8 months ago (2016-04-21 20:27:09 UTC) #18
chasej
LGTM, with nits. https://codereview.chromium.org/1802773002/diff/200001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h (right): https://codereview.chromium.org/1802773002/diff/200001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h#newcode44 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h:44: // Returns null if the header ...
4 years, 8 months ago (2016-04-21 20:54:50 UTC) #19
Marijn Kruisselbrink
+japhet for core/ OWNERS https://codereview.chromium.org/1802773002/diff/200001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h (right): https://codereview.chromium.org/1802773002/diff/200001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h#newcode44 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.h:44: // Returns null if the ...
4 years, 8 months ago (2016-04-21 21:58:37 UTC) #21
Nate Chapin
LGTM w/nits https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp (right): https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp#newcode29 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp:29: bool isWhitespace(UChar chr) platform/network/HTTPParsers.h has this? https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp#newcode34 ...
4 years, 8 months ago (2016-04-21 22:09:10 UTC) #22
Marijn Kruisselbrink
https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp (right): https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp#newcode29 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp:29: bool isWhitespace(UChar chr) On 2016/04/21 at 22:09:10, Nate Chapin ...
4 years, 8 months ago (2016-04-21 22:22:47 UTC) #23
Nate Chapin
https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp (right): https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp#newcode29 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp:29: bool isWhitespace(UChar chr) On 2016/04/21 22:22:47, Marijn Kruisselbrink wrote: ...
4 years, 8 months ago (2016-04-21 22:25:56 UTC) #24
Marijn Kruisselbrink
https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp File third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp (right): https://codereview.chromium.org/1802773002/diff/220001/third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp#newcode29 third_party/WebKit/Source/core/origin_trials/OriginTrialContext.cpp:29: bool isWhitespace(UChar chr) On 2016/04/21 at 22:25:56, Nate Chapin ...
4 years, 8 months ago (2016-04-21 22:34:10 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1802773002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1802773002/220001
4 years, 8 months ago (2016-04-25 19:52:54 UTC) #28
commit-bot: I haz the power
Committed patchset #10 (id:220001)
4 years, 8 months ago (2016-04-25 21:36:58 UTC) #30
commit-bot: I haz the power
4 years, 8 months ago (2016-04-25 21:38:35 UTC) #32
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/7b6fa286a1a152601fe32fc988df4083986c0a2e
Cr-Commit-Position: refs/heads/master@{#389569}

Powered by Google App Engine
This is Rietveld 408576698