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

Issue 1811163002: Share link header parsing code between blink and content. (Closed)

Created:
4 years, 9 months ago by Marijn Kruisselbrink
Modified:
4 years, 7 months ago
CC:
blink-reviews, blink-worker-reviews_chromium.org, blundell+watchlist_chromium.org, chromium-reviews, darin-cc_chromium.org, droger+watchlist_chromium.org, gavinp+prerender_chromium.org, gavinp+loader_chromium.org, horo+watch_chromium.org, jam, Nate Chapin, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, kinuko, loading-reviews_chromium.org, michaeln, nhiroki, sdefresne+watchlist_chromium.org, serviceworker-reviews, tyoshino+watch_chromium.org, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@base-optional
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Share link header parsing code between blink and content. Introduces a new components/link_header_util with the shared parsing logic. Moves blinks LinkHeader code from core/loader to platform/network to be able to depend on this and use std::string. BUG=605258 Committed: https://crrev.com/9b28f42062acbf9241543d48b9479b449c95fc7b Cr-Commit-Position: refs/heads/master@{#393650}

Patch Set 1 #

Patch Set 2 : #

Total comments: 17

Patch Set 3 : address most comments #

Patch Set 4 : rebase #

Total comments: 16

Patch Set 5 : address comments and fix undefined behavior causing test failures #

Patch Set 6 : fix use of value_or #

Total comments: 13

Patch Set 7 : address mmenke's comments #

Total comments: 27

Patch Set 8 : address more comments #

Total comments: 1

Patch Set 9 : address comments (don't support single quotes for quoted strings, etc) #

Total comments: 2

Patch Set 10 : try to make bots happy #

Total comments: 2

Patch Set 11 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+925 lines, -1057 lines) Patch
M components/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -0 lines 0 comments Download
M components/gcm_driver/crypto/encryption_header_parsers.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
A + components/link_header_util/BUILD.gn View 1 1 chunk +7 lines, -7 lines 0 comments Download
A components/link_header_util/DEPS View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
A components/link_header_util/OWNERS View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
A components/link_header_util/link_header_util.h View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
A components/link_header_util/link_header_util.cc View 1 2 3 4 5 6 7 8 9 1 chunk +195 lines, -0 lines 0 comments Download
A components/link_header_util/link_header_util.gyp View 1 chunk +21 lines, -0 lines 0 comments Download
A components/link_header_util/link_header_util_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +224 lines, -0 lines 0 comments Download
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/link_header_support.cc View 1 2 3 4 6 chunks +14 lines, -169 lines 0 comments Download
M content/browser/service_worker/link_header_support_unittest.cc View 1 2 1 chunk +0 lines, -195 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_security_headers.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M net/http/http_util.h View 1 2 3 4 5 6 7 8 9 7 chunks +48 lines, -5 lines 0 comments Download
M net/http/http_util.cc View 1 2 3 4 5 6 7 8 9 8 chunks +99 lines, -19 lines 0 comments Download
M net/http/http_util_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +113 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/preload/resources/media-link-headers.php View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -2 lines 0 comments Download
D third_party/WebKit/Source/core/loader/LinkHeader.h View 1 1 chunk +0 lines, -74 lines 0 comments Download
D third_party/WebKit/Source/core/loader/LinkHeader.cpp View 1 1 chunk +0 lines, -328 lines 0 comments Download
D third_party/WebKit/Source/core/loader/LinkHeaderTest.cpp View 1 1 chunk +0 lines, -213 lines 0 comments Download
M third_party/WebKit/Source/core/loader/LinkLoader.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/WebKit/Source/platform/network/LinkHeader.h View 1 2 3 4 5 6 7 8 4 chunks +10 lines, -12 lines 0 comments Download
A third_party/WebKit/Source/platform/network/LinkHeader.cpp View 1 2 3 4 5 6 7 8 1 chunk +89 lines, -0 lines 0 comments Download
A + third_party/WebKit/Source/platform/network/LinkHeaderTest.cpp View 1 2 3 4 5 6 7 8 7 chunks +27 lines, -23 lines 0 comments Download

Messages

Total messages: 49 (14 generated)
Marijn Kruisselbrink
Not actually entirely happy with this yet (and it depends on base::optional which hasn't landed ...
4 years, 9 months ago (2016-03-25 22:10:47 UTC) #2
Yoav Weiss
On 2016/03/25 22:10:47, Marijn Kruisselbrink wrote: > Not actually entirely happy with this yet (and ...
4 years, 8 months ago (2016-03-29 07:16:40 UTC) #3
Yoav Weiss
Initial nits. I'll continue reviewing tomorrow https://codereview.chromium.org/1811163002/diff/20001/base/optional.h File base/optional.h (right): https://codereview.chromium.org/1811163002/diff/20001/base/optional.h#newcode29 base/optional.h:29: // const nullopt_t ...
4 years, 8 months ago (2016-03-29 22:05:45 UTC) #4
Yoav Weiss
Thanks for working on this! All in all, looks good :) Left a bunch of ...
4 years, 8 months ago (2016-03-30 07:38:52 UTC) #5
Marijn Kruisselbrink
I think I addressed most of your comments. https://codereview.chromium.org/1811163002/diff/20001/base/optional.h File base/optional.h (right): https://codereview.chromium.org/1811163002/diff/20001/base/optional.h#newcode29 base/optional.h:29: // ...
4 years, 8 months ago (2016-04-20 01:45:04 UTC) #8
kinuko
Huh neat. A few drive-by nit-picking comments.. https://codereview.chromium.org/1811163002/diff/80001/components/link_header_util/link_header_util_unittest.cc File components/link_header_util/link_header_util_unittest.cc (right): https://codereview.chromium.org/1811163002/diff/80001/components/link_header_util/link_header_util_unittest.cc#newcode110 components/link_header_util/link_header_util_unittest.cc:110: // Test ...
4 years, 8 months ago (2016-04-20 02:57:48 UTC) #10
dcheng
Drive-by https://codereview.chromium.org/1811163002/diff/80001/components/link_header_util/link_header_util.cc File components/link_header_util/link_header_util.cc (right): https://codereview.chromium.org/1811163002/diff/80001/components/link_header_util/link_header_util.cc#newcode201 components/link_header_util/link_header_util.cc:201: params->insert(std::make_pair(name, base::nullopt_t(0))); Just write base::nullopt here.
4 years, 8 months ago (2016-04-20 04:41:06 UTC) #13
Yoav Weiss
core/ LGTM % a few nits The "value" terminology seems fine if it matches the ...
4 years, 8 months ago (2016-04-20 09:42:05 UTC) #14
Marijn Kruisselbrink
https://codereview.chromium.org/1811163002/diff/80001/components/link_header_util/link_header_util.cc File components/link_header_util/link_header_util.cc (right): https://codereview.chromium.org/1811163002/diff/80001/components/link_header_util/link_header_util.cc#newcode201 components/link_header_util/link_header_util.cc:201: params->insert(std::make_pair(name, base::nullopt_t(0))); On 2016/04/20 at 04:41:06, dcheng wrote: > ...
4 years, 8 months ago (2016-04-20 21:07:48 UTC) #17
Marijn Kruisselbrink
+jochen for components/ and third_party/WebKit/Source/platform and content/ OWNERS +mmenke for net/ OWNERS (and to answer ...
4 years, 8 months ago (2016-04-21 23:07:50 UTC) #19
mmenke
https://codereview.chromium.org/1811163002/diff/140001/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/1811163002/diff/140001/net/http/http_util.cc#newcode539 net/http/http_util.cc:539: return false; In this case we've partially populated out, ...
4 years, 8 months ago (2016-04-22 15:28:41 UTC) #20
jochen (gone - plz use gerrit)
+esprehn for the platform/ stuff
4 years, 8 months ago (2016-04-22 15:29:20 UTC) #22
Marijn Kruisselbrink
mmenke: hopefully addressed your comments; and I'm still wondering about your opinion about adding a ...
4 years, 8 months ago (2016-04-25 19:52:11 UTC) #23
mmenke
On 2016/04/25 19:52:11, Marijn Kruisselbrink wrote: > mmenke: hopefully addressed your comments; and I'm still ...
4 years, 8 months ago (2016-04-26 17:27:15 UTC) #24
mmenke
Sorry for slowness, review overload last week. Should be more responsive now. https://codereview.chromium.org/1811163002/diff/140001/net/http/http_util.cc File net/http/http_util.cc ...
4 years, 8 months ago (2016-04-26 18:05:58 UTC) #25
Marijn Kruisselbrink
Still working on figuring out what to do about the windows compile errors (I believe ...
4 years, 8 months ago (2016-04-27 01:49:50 UTC) #27
esprehn
Can we use kFoo named constants? That's what we plan to do in blink. -- ...
4 years, 8 months ago (2016-04-27 04:00:01 UTC) #28
esprehn
Can we use kFoo named constants? That's what we plan to do in blink. -- ...
4 years, 8 months ago (2016-04-27 04:00:02 UTC) #29
mmenke
On 2016/04/27 04:00:02, esprehn wrote: > Can we use kFoo named constants? That's what we ...
4 years, 8 months ago (2016-04-27 04:02:23 UTC) #30
mmenke
https://codereview.chromium.org/1811163002/diff/160001/net/http/http_util_unittest.cc File net/http/http_util_unittest.cc (right): https://codereview.chromium.org/1811163002/diff/160001/net/http/http_util_unittest.cc#newcode1217 net/http/http_util_unittest.cc:1217: std::string data = "foo=\"bar\"; name='value"; On 2016/04/27 01:49:50, Marijn ...
4 years, 8 months ago (2016-04-27 04:02:40 UTC) #31
esprehn
https://codereview.chromium.org/1811163002/diff/160001/components/link_header_util/DEPS File components/link_header_util/DEPS (right): https://codereview.chromium.org/1811163002/diff/160001/components/link_header_util/DEPS#newcode4 components/link_header_util/DEPS:4: "-content", also block third_party/WebKit, this code needs to be ...
4 years, 7 months ago (2016-04-27 08:10:18 UTC) #32
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/1811163002/diff/200001/components/link_header_util/link_header_util.cc File components/link_header_util/link_header_util.cc (right): https://codereview.chromium.org/1811163002/diff/200001/components/link_header_util/link_header_util.cc#newcode100 components/link_header_util/link_header_util.cc:100: }; disallow copy/assign
4 years, 7 months ago (2016-04-27 13:14:33 UTC) #33
Yoav Weiss
On 2016/04/27 01:49:50, Marijn Kruisselbrink wrote: > Still working on figuring out what to do ...
4 years, 7 months ago (2016-04-27 13:33:18 UTC) #34
mmenke
Marijn: Are you waiting on me, or just haven't had a chance to respond to ...
4 years, 7 months ago (2016-05-02 19:13:23 UTC) #35
Marijn Kruisselbrink
On 2016/05/02 at 19:13:23, mmenke wrote: > Marijn: Are you waiting on me, or just ...
4 years, 7 months ago (2016-05-02 19:59:26 UTC) #36
Marijn Kruisselbrink
On 2016/04/27 at 04:02:23, mmenke wrote: > All caps enums are the prevailing style in ...
4 years, 7 months ago (2016-05-11 00:36:56 UTC) #37
mmenke
net/ LGTM, though looks like some of the bots are sad. https://codereview.chromium.org/1811163002/diff/220001/net/http/http_util_unittest.cc File net/http/http_util_unittest.cc (right): ...
4 years, 7 months ago (2016-05-11 15:00:28 UTC) #38
Marijn Kruisselbrink
On 2016/05/11 at 15:00:28, mmenke wrote: > looks like some of the bots are sad. ...
4 years, 7 months ago (2016-05-11 18:12:13 UTC) #39
Marijn Kruisselbrink
esprehn: ping?
4 years, 7 months ago (2016-05-13 18:41:52 UTC) #40
esprehn
lgtm https://codereview.chromium.org/1811163002/diff/240001/components/link_header_util/link_header_util.h File components/link_header_util/link_header_util.h (right): https://codereview.chromium.org/1811163002/diff/240001/components/link_header_util/link_header_util.h#newcode25 components/link_header_util/link_header_util.h:25: std::vector<StringIteratorPair> SplitLinkHeader(const std::string& header); this could just be ...
4 years, 7 months ago (2016-05-13 19:36:12 UTC) #41
Marijn Kruisselbrink
https://codereview.chromium.org/1811163002/diff/240001/components/link_header_util/link_header_util.h File components/link_header_util/link_header_util.h (right): https://codereview.chromium.org/1811163002/diff/240001/components/link_header_util/link_header_util.h#newcode25 components/link_header_util/link_header_util.h:25: std::vector<StringIteratorPair> SplitLinkHeader(const std::string& header); On 2016/05/13 at 19:36:12, esprehn ...
4 years, 7 months ago (2016-05-13 19:39:38 UTC) #42
esprehn
On 2016/05/13 at 19:39:38, mek wrote: > https://codereview.chromium.org/1811163002/diff/240001/components/link_header_util/link_header_util.h > File components/link_header_util/link_header_util.h (right): > > https://codereview.chromium.org/1811163002/diff/240001/components/link_header_util/link_header_util.h#newcode25 ...
4 years, 7 months ago (2016-05-13 19:56:26 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1811163002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1811163002/260001
4 years, 7 months ago (2016-05-13 20:14:06 UTC) #46
commit-bot: I haz the power
Committed patchset #11 (id:260001)
4 years, 7 months ago (2016-05-13 21:46:35 UTC) #47
commit-bot: I haz the power
4 years, 7 months ago (2016-05-13 21:48:39 UTC) #49
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/9b28f42062acbf9241543d48b9479b449c95fc7b
Cr-Commit-Position: refs/heads/master@{#393650}

Powered by Google App Engine
This is Rietveld 408576698