New issue
Advanced search Search tips

Issue 895901 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Duplicate code for protocol default ports

Project Member Reported by nasko@chromium.org, Oct 16

Issue description

We have two main classes representing URLs in the codebase - KURL and GURL. They tend to share some of the parsing code, however they have separate functions for deciding what is the default port number for standard schemes.

KURL uses DefaultPortForProtocol (https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/weborigin/known_ports.cc?l=56)
GURL uses DefaultPortForScheme (https://cs.chromium.org/chromium/src/url/url_canon_stdurl.cc?l=114)

We should try to converge these to a single implementation. Ideally, the known_ports.cc file will just disappear.
 
Can I take a look the issue? :)
Sure, if you are up for it, go for it. Just beware that it might be tricky. Anticipate that reviewers will have strong opinions on how things are structured/done, as dependencies across components are important.
Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.

Sign in to add a comment