It is regulated in the browser - that's why Google has to explicitly redirect you to YouTube and pass the secret value in the URL since YT can't access your Google session cookie.
YouTube is owned by Google so they can make both websites cooperate to share data between each other, working around the browser's same-origin policy.
YouTube is owned by Google so they can make both websites cooperate to share data between each other, working around the browser's same-origin policy.