Allow chrome-untrusted://terminal to set 3p cookies

Cookies are required for corp SSH relays and may also be used by other
users of SSH relays.

Bug: 1313810
Change-Id: Ib506a3b51b81b4746e044f8bb164f6872159f623
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3607606
Reviewed-by: Jiewei Qian <qjw@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/main@{#996980}
diff --git a/chrome/browser/ash/web_applications/terminal_source.cc b/chrome/browser/ash/web_applications/terminal_source.cc
index 960ddff..8ac46c5 100644
--- a/chrome/browser/ash/web_applications/terminal_source.cc
+++ b/chrome/browser/ash/web_applications/terminal_source.cc
@@ -130,6 +130,8 @@
         ContentSettingsType::SOUND}) {
     webui_allowlist->RegisterAutoGrantedPermission(terminal_origin, permission);
   }
+  webui_allowlist->RegisterAutoGrantedThirdPartyCookies(
+      terminal_origin, {ContentSettingsPattern::Wildcard()});
 }
 
 TerminalSource::~TerminalSource() = default;