Add SecurityOrigin::GetRegistrableDomain

This CL implements GetRegistrableDomain as a SecurityOrigin method.

A registrable domain is a suffix of a full domain that consists of
public suffix plus an additional component. E.g. the registrable
domain of `foo.bar.example.com` is `example.com`, since `com` is a
public suffix and `example` is the additional component.

If two tuple origins have the same scheme and the same registrable
domain, they can access each other by updating document.domain.
That implies they have to share the same process and the same event
loop.

Change-Id: I4521ce036a4f568f0c0d3e4b1c593b66d5be3ead
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1525702
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#643296}
5 files changed