Support wasm for ssh in Terminal [chromium/src : main]

0 views
Skip to first unread message

Joel Hockey (Gerrit)

unread,
Aug 9, 2022, 1:05:03 AM8/9/22
to Joel Hockey, chromium-a...@chromium.org, extension...@chromium.org, Xiyuan Xia, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury

Attention is currently required from: Xiyuan Xia.

View Change

    To view, visit change 3818745. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I84c70ad87aadfdedb5091903387b8048542b2ddd
    Gerrit-Change-Number: 3818745
    Gerrit-PatchSet: 1
    Gerrit-Owner: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Xiyuan Xia <xiy...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-Attention: Xiyuan Xia <xiy...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Aug 2022 05:04:53 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Xiyuan Xia (Gerrit)

    unread,
    Aug 9, 2022, 12:35:45 PM8/9/22
    to Joel Hockey, chromium-a...@chromium.org, extension...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury

    Attention is currently required from: Joel Hockey.

    Patch set 1:Code-Review +1

    View Change

    2 comments:

    • Patchset:

    • File extensions/browser/api/socket/socket_api.cc:

      • Patch Set #1, Line 176: DCHECK_EQ(url::Origin::Create(source_url()),

        I wonder whether we should enforce it in production, here and in `CheckRequest`.

        e.g.

        ```
        return url::Origin::Create(source_url()) ==
        url::Origin::Create(GURL("chrome-untrusted://terminal")));
        ```

    To view, visit change 3818745. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I84c70ad87aadfdedb5091903387b8048542b2ddd
    Gerrit-Change-Number: 3818745
    Gerrit-PatchSet: 1
    Gerrit-Owner: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Xiyuan Xia <xiy...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-Attention: Joel Hockey <joelh...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Aug 2022 16:35:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Joel Hockey (Gerrit)

    unread,
    Aug 9, 2022, 7:40:41 PM8/9/22
    to Joel Hockey, chromium-a...@chromium.org, extension...@chromium.org, Xiyuan Xia, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury

    View Change

    1 comment:

    • File extensions/browser/api/socket/socket_api.cc:

      • I wonder whether we should enforce it in production, here and in `CheckRequest`. […]

        Done, also added IS_CHROMEOS_ASH guards.

    To view, visit change 3818745. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I84c70ad87aadfdedb5091903387b8048542b2ddd
    Gerrit-Change-Number: 3818745
    Gerrit-PatchSet: 1
    Gerrit-Owner: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Xiyuan Xia <xiy...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-Comment-Date: Tue, 09 Aug 2022 23:40:29 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Xiyuan Xia <xiy...@chromium.org>
    Gerrit-MessageType: comment

    Xiyuan Xia (Gerrit)

    unread,
    Aug 9, 2022, 8:56:26 PM8/9/22
    to Joel Hockey, chromium-a...@chromium.org, extension...@chromium.org, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury

    Attention is currently required from: Joel Hockey.

    Patch set 4:Code-Review +1

    View Change

    1 comment:

    To view, visit change 3818745. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I84c70ad87aadfdedb5091903387b8048542b2ddd
    Gerrit-Change-Number: 3818745
    Gerrit-PatchSet: 4
    Gerrit-Owner: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Joel Hockey <joelh...@chromium.org>
    Gerrit-Reviewer: Xiyuan Xia <xiy...@chromium.org>
    Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
    Gerrit-Attention: Joel Hockey <joelh...@chromium.org>
    Gerrit-Comment-Date: Wed, 10 Aug 2022 00:56:13 +0000

    Joel Hockey (Gerrit)

    unread,
    Aug 9, 2022, 9:04:51 PM8/9/22
    to Joel Hockey, chromium-a...@chromium.org, extension...@chromium.org, Xiyuan Xia, Chromium LUCI CQ, chromium...@chromium.org, Sadrul Chowdhury

    Attention is currently required from: Joel Hockey.

    Patch set 4:Commit-Queue +2

    View Change

      To view, visit change 3818745. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I84c70ad87aadfdedb5091903387b8048542b2ddd
      Gerrit-Change-Number: 3818745
      Gerrit-PatchSet: 4
      Gerrit-Owner: Joel Hockey <joelh...@chromium.org>
      Gerrit-Reviewer: Joel Hockey <joelh...@chromium.org>
      Gerrit-Reviewer: Xiyuan Xia <xiy...@chromium.org>
      Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
      Gerrit-Attention: Joel Hockey <joelh...@chromium.org>
      Gerrit-Comment-Date: Wed, 10 Aug 2022 01:04:29 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Chromium LUCI CQ (Gerrit)

      unread,
      Aug 9, 2022, 10:10:22 PM8/9/22
      to Joel Hockey, chromium-a...@chromium.org, extension...@chromium.org, Xiyuan Xia, chromium...@chromium.org, Sadrul Chowdhury

      Chromium LUCI CQ submitted this change.

      View Change


      Approvals: Xiyuan Xia: Looks good to me Joel Hockey: Commit
      Support wasm for ssh in Terminal

      Wasm SSH requires update to CSP:
      * script-src 'self' 'wasm-unsafe-eval';
      * worker-src 'self';

      And also access to chrome.sockets.tcp. The sockets API code currently
      assumes that it is always running inside an extension, so some
      refactoring is required to run inside webui.

      Bug: 1350479
      Change-Id: I84c70ad87aadfdedb5091903387b8048542b2ddd
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3818745
      Commit-Queue: Joel Hockey <joelh...@chromium.org>
      Reviewed-by: Xiyuan Xia <xiy...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1033315}
      ---
      M chrome/browser/ash/web_applications/terminal_source.cc
      M extensions/browser/api/socket/socket_api.cc
      M extensions/browser/api/socket/socket_api.h
      M extensions/browser/api/sockets_tcp/sockets_tcp_api.cc
      M extensions/common/api/_api_features.json
      5 files changed, 106 insertions(+), 29 deletions(-)


      To view, visit change 3818745. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I84c70ad87aadfdedb5091903387b8048542b2ddd
      Gerrit-Change-Number: 3818745
      Gerrit-PatchSet: 5
      Gerrit-Owner: Joel Hockey <joelh...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Joel Hockey <joelh...@chromium.org>
      Gerrit-Reviewer: Xiyuan Xia <xiy...@chromium.org>
      Gerrit-CC: Sadrul Chowdhury <sad...@chromium.org>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages