DescriptionMerge logic for SameDomainOrHost for GURLs and Origins
Previously, we used to just call:
SameDomainOrHost(origin1.GetURL(), origin2.GetURL())
This isn't necessary, as we have all the information in the Origin itself.
Additionally, GetURL() isn't free. We do a bunch of string copies,
allocations, and some non-cheap policy decisions.
This patch moves GURL::HostIsIPAddress logic to url_util, and reuses
that code for both GURLs and Origins.
BUG=664174, 348655
Committed: https://crrev.com/475851dad085b226d5459363e4daf152eb4cfc77
Cr-Commit-Position: refs/heads/master@{#439287}
Patch Set 1 #
Total comments: 2
Patch Set 2 : pkasting review (length() -> empty()) #
Total comments: 2
Patch Set 3 : brettw review #
Messages
Total messages: 19 (10 generated)
|