Clean up conversions from CanonicalCookie::Domain() to domain (per RFC)
In CanonicalCookie, the string member |domain_| is a combination of the cookie's domain (as defined in RFC 6265bis) and the negation of the cookie's host-only-flag, which is indicated by the presence of a leading dot. The Domain() accessor returns the |domain_| string whereas many consumers actually want the RFC's definition of the cookie domain, leading to many of them manually stripping off a leading dot. This CL moves CanonicalCookie::DomainWithoutDot() from private to public so that users can directly access the domain without worrying about how it's internally represented, and organizes some functions in cookie_util to avoid redundant string operations. Bug: 1071291 Change-Id: If1db8ece3d436956696951ed4eafeb6fa3784bfd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2151310Reviewed-by:Karan Bhatia <karandeepb@chromium.org> Reviewed-by:
Martin Šrámek <msramek@chromium.org> Reviewed-by:
Maksim Orlovich <morlovich@chromium.org> Reviewed-by:
Andrew Grieve <agrieve@chromium.org> Commit-Queue: Lily Chen <chlily@chromium.org> Cr-Commit-Position: refs/heads/master@{#760191}
Showing
Please register or sign in to comment