|
|
Chromium Code Reviews|
Created:
4 years, 2 months ago by Charlie Harrison Modified:
4 years, 2 months ago CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, dglazkov+blink Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd Origin::CreateFromNormalizedTuple and call from WebSecurityOrigin
BUG=
Committed: https://crrev.com/edf893fee347ad915af17f4abbf19e19e3131898
Cr-Commit-Position: refs/heads/master@{#424643}
Patch Set 1 #Patch Set 2 : tests, casts, gophers, oh my! #Patch Set 3 : fix up dchecks #Patch Set 4 : fix up logic #Patch Set 5 : loosen checks #
Total comments: 5
Patch Set 6 : mkwst review #
Total comments: 2
Patch Set 7 : ncarter review #
Total comments: 1
Patch Set 8 : git cl format #
Messages
Total messages: 49 (35 generated)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Exceeded global retry quota
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
csharrison@chromium.org changed reviewers: + mkwst@chromium.org
Hey Mike, here is a first pass at the fast-path WebSecurityOrigin->Origin conversion. Unfortunately to keep logic simple, we still need to perform a few checks in IsValidInput because: - GURLs can have schemes that "require" ports with 0 port (ip addresses, see previous test failures in PS 4) - GURLs can have invalid schemes (e.g. blob) So, I kept the scheme check and port checks, which I don't think is too big a deal.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM! Modulo the gopher bit, which I don't think we need? https://codereview.chromium.org/2391383003/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp (right): https://codereview.chromium.org/2391383003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp:51: return protocol == "gopher"; This seems unrelated? Moreover, we don't actually support gopher anywhere, so... https://codereview.chromium.org/2391383003/diff/80001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/2391383003/diff/80001/url/origin.cc#newcode64 url/origin.cc:64: return Origin(scheme, host, port, true /* is_canonicalized */); Nit: Did you consider making this an enum rather than adding a comment next to an opaque bool? I think that would end up being more readable.
Thanks! https://codereview.chromium.org/2391383003/diff/80001/content/child/blink_pla... File content/child/blink_platform_impl_unittest.cc (right): https://codereview.chromium.org/2391383003/diff/80001/content/child/blink_pla... content/child/blink_platform_impl_unittest.cc:67: {"gopher://example.com/", "gopher", "example.com", 70}, FYI: The gopher changes are needed for this test to pass. I included this test because it's in origin_unittest. I'm happy to remove this though.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
csharrison@chromium.org changed reviewers: + nick@chromium.org
+nick for //content OWNERS. https://codereview.chromium.org/2391383003/diff/80001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/2391383003/diff/80001/url/origin.cc#newcode64 url/origin.cc:64: return Origin(scheme, host, port, true /* is_canonicalized */); On 2016/10/11 08:38:33, Mike West wrote: > Nit: Did you consider making this an enum rather than adding a comment next to > an opaque bool? I think that would end up being more readable. Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2391383003/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp (right): https://codereview.chromium.org/2391383003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp:51: return protocol == "gopher"; On 2016/10/11 08:38:33, Mike West wrote: > This seems unrelated? Moreover, we don't actually support gopher anywhere, so... Agree, we don't handle gopher, and won't ever. I've added a few tests that exercise it, because it's a weird case, an unhandled protocol that GURL knows about, but mostly out of whimsy. If these tests are causing trouble, it's okay to delete the tests.
On 2016/10/11 18:21:52, ncarter wrote: > https://codereview.chromium.org/2391383003/diff/80001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp (right): > > https://codereview.chromium.org/2391383003/diff/80001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/weborigin/KnownPorts.cpp:51: return protocol > == "gopher"; > On 2016/10/11 08:38:33, Mike West wrote: > > This seems unrelated? Moreover, we don't actually support gopher anywhere, > so... > > Agree, we don't handle gopher, and won't ever. I've added a few tests that > exercise it, because it's a weird case, an unhandled protocol that GURL knows > about, but mostly out of whimsy. If these tests are causing trouble, it's okay > to delete the tests. There's just one test in origin_unittest that handles a gopher GURL -> Origin transformation, but it's not causing any issues. I've removed the gopher stuff in the renderer.
content lgtm https://codereview.chromium.org/2391383003/diff/100001/content/child/blink_pl... File content/child/blink_platform_impl_unittest.cc (right): https://codereview.chromium.org/2391383003/diff/100001/content/child/blink_pl... content/child/blink_platform_impl_unittest.cc:85: {"blob:http://u:p@example.com/guid-goes-here", "http", "example.com", 80}, Should we add a foo.appspot.com example (or co.uk, or k12.va.us, or something else where it's necessary to preserve more than one dot) to this list?
Thanks https://codereview.chromium.org/2391383003/diff/100001/content/child/blink_pl... File content/child/blink_platform_impl_unittest.cc (right): https://codereview.chromium.org/2391383003/diff/100001/content/child/blink_pl... content/child/blink_platform_impl_unittest.cc:85: {"blob:http://u:p@example.com/guid-goes-here", "http", "example.com", 80}, On 2016/10/11 18:26:57, ncarter wrote: > Should we add a http://foo.appspot.com example (or co.uk, or k12.va.us, or something > else where it's necessary to preserve more than one dot) to this list? Done.
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by csharrison@chromium.org
The CQ bit was checked by csharrison@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mkwst@chromium.org, nick@chromium.org Link to the patchset: https://codereview.chromium.org/2391383003/#ps120001 (title: "ncarter review")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2391383003/diff/120001/content/child/blink_pl... File content/child/blink_platform_impl_unittest.cc (right): https://codereview.chromium.org/2391383003/diff/120001/content/child/blink_pl... content/child/blink_platform_impl_unittest.cc:86: {"blob:https://example.co.uk/guid-goes-here", "https", "example.co.uk", 443}, 80 cols.
The CQ bit was unchecked by csharrison@chromium.org
Good catch :)
The CQ bit was checked by csharrison@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from nick@chromium.org, mkwst@chromium.org Link to the patchset: https://codereview.chromium.org/2391383003/#ps140001 (title: "git cl format")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #8 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== Add Origin::CreateFromNormalizedTuple and call from WebSecurityOrigin BUG= ========== to ========== Add Origin::CreateFromNormalizedTuple and call from WebSecurityOrigin BUG= Committed: https://crrev.com/edf893fee347ad915af17f4abbf19e19e3131898 Cr-Commit-Position: refs/heads/master@{#424643} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/edf893fee347ad915af17f4abbf19e19e3131898 Cr-Commit-Position: refs/heads/master@{#424643} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
