Commit 1bf57a56 authored by Lily Chen's avatar Lily Chen Committed by Commit Bot

Add documentation for net::SchemefulSite normalization cases

Change-Id: I7780c3040d2ac3e4d67c394fe34abeadc1e9612b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518918Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Reviewed-by: default avatarJohn Delaney <johnidel@chromium.org>
Commit-Queue: Lily Chen <chlily@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824193}
parent 8f901bf8
......@@ -29,6 +29,15 @@ namespace net {
// Class which represents a scheme and etld+1 for an origin, as specified by
// https://html.spec.whatwg.org/multipage/origin.html#obtain-a-site.
//
// A SchemefulSite is obtained from an input origin by normalizing, such that:
// 1. Opaque origins have distinct SchemefulSites.
// 2. http(s) origins have the same SchemefulSite iff they share a scheme, and
// share a hostname or registrable domain.
// 3. Non-http(s) origins have the same SchemefulSite iff they share a scheme
// and host.
// 4. Origins which differ only by port have the same SchemefulSite.
// 5. Websocket origins cannot have a SchemefulSite (they trigger a DCHECK).
class NET_EXPORT SchemefulSite {
public:
SchemefulSite() = default;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment