add external protocol action result code [chromium/src : main]

0 views
Skip to first unread message

Joshua Thomas (Gerrit)

unread,
Nov 4, 2025, 4:32:23 PM (23 hours ago) Nov 4
to Robert Ogden, David Bokan, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from David Bokan and Robert Ogden

Joshua Thomas added 2 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Joshua Thomas . resolved

I know the conversation is still being had offline, but wanted to send a small CL before I head home.

File chrome/browser/actor/actor_navigation_throttle.cc
Line 224, Patchset 1 (Latest): navigation_handle()->IsExternalProtocol()) {
Joshua Thomas . unresolved

This easily gets us the external protocol error. If we want the error to be more generally "kSchemeBlocked", then we have to rework how we reject the decision callback

(still shouldn't be too hard)

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
  • Robert Ogden
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
Gerrit-Change-Number: 7120367
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Attention: Robert Ogden <rober...@chromium.org>
Gerrit-Comment-Date: Tue, 04 Nov 2025 21:32:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Robert Ogden (Gerrit)

unread,
Nov 4, 2025, 4:40:09 PM (23 hours ago) Nov 4
to Joshua Thomas, David Bokan, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from David Bokan and Joshua Thomas

Robert Ogden voted and added 2 comments

Votes added by Robert Ogden

Code-Review+1

2 comments

File chrome/browser/actor/actor_features.cc
Line 35, Patchset 1 (Latest): base::FEATURE_DISABLED_BY_DEFAULT);
Robert Ogden . unresolved

let's enable by default to have this as a kill switch instead since we're blocking folks' work without this enabled

File chrome/browser/actor/actor_navigation_throttle.cc
Line 224, Patchset 1 (Latest): navigation_handle()->IsExternalProtocol()) {
Joshua Thomas . unresolved

This easily gets us the external protocol error. If we want the error to be more generally "kSchemeBlocked", then we have to rework how we reject the decision callback

(still shouldn't be too hard)

Robert Ogden

this seems good to me. I think "internal" non-http protocols like file:// and ftp:// can remain blocked under the url status code

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
  • Joshua Thomas
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
    Gerrit-Change-Number: 7120367
    Gerrit-PatchSet: 1
    Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Joshua Thomas <masn...@chromium.org>
    Gerrit-Attention: David Bokan <bo...@chromium.org>
    Gerrit-Comment-Date: Tue, 04 Nov 2025 21:39:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Joshua Thomas <masn...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Bokan (Gerrit)

    unread,
    Nov 4, 2025, 4:41:14 PM (23 hours ago) Nov 4
    to Joshua Thomas, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Joshua Thomas

    David Bokan added 1 comment

    File chrome/browser/actor/actor_navigation_throttle.cc
    Line 224, Patchset 1 (Latest): navigation_handle()->IsExternalProtocol()) {
    David Bokan . unresolved

    This is based on common_params->url - do you know if that's updated for HTTP redirects? My guess would be no (but I'm not sure) so this won't be correct in cases where we get an HTTP redirect.

    Could we pass in the reason from the policy check? That'd also make sure we're returning the reason that the policy code actually used to reject.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joshua Thomas
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
    Gerrit-Change-Number: 7120367
    Gerrit-PatchSet: 1
    Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Joshua Thomas <masn...@chromium.org>
    Gerrit-Comment-Date: Tue, 04 Nov 2025 21:41:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    David Bokan (Gerrit)

    unread,
    Nov 4, 2025, 4:46:30 PM (23 hours ago) Nov 4
    to Joshua Thomas, Kevin McNee, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Joshua Thomas

    David Bokan voted and added 2 comments

    Votes added by David Bokan

    Code-Review+1

    2 comments

    Patchset-level comments
    David Bokan . resolved

    looks good - though I'd suggest actually plumbing the reason (via an ActorResultCode) from the policy checker to make sure we're not assuming why it blocked.

    File chrome/browser/actor/actor_navigation_throttle.cc
    Line 224, Patchset 1 (Latest): navigation_handle()->IsExternalProtocol()) {
    Joshua Thomas . unresolved

    This easily gets us the external protocol error. If we want the error to be more generally "kSchemeBlocked", then we have to rework how we reject the decision callback

    (still shouldn't be too hard)

    Robert Ogden

    this seems good to me. I think "internal" non-http protocols like file:// and ftp:// can remain blocked under the url status code

    David Bokan

    +1 - though if you take my suggestion of plumbing the reason from the policy checker you'd need to make this check more granular in that code too (i.e. check IsExternal there). (plumbing the result code also ensures we're also looking at redirected URLs)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joshua Thomas
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
    Gerrit-Change-Number: 7120367
    Gerrit-PatchSet: 1
    Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Kevin McNee <mc...@chromium.org>
    Gerrit-Attention: Joshua Thomas <masn...@chromium.org>
    Gerrit-Comment-Date: Tue, 04 Nov 2025 21:46:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Joshua Thomas <masn...@chromium.org>
    Comment-In-Reply-To: Robert Ogden <rober...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kevin McNee (Gerrit)

    unread,
    Nov 4, 2025, 5:43:03 PM (22 hours ago) Nov 4
    to Joshua Thomas, David Bokan, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Joshua Thomas

    Kevin McNee added 1 comment

    File chrome/browser/actor/actor_navigation_throttle.cc
    Line 224, Patchset 1 (Latest): navigation_handle()->IsExternalProtocol()) {
    David Bokan . unresolved

    This is based on common_params->url - do you know if that's updated for HTTP redirects? My guess would be no (but I'm not sure) so this won't be correct in cases where we get an HTTP redirect.

    Could we pass in the reason from the policy check? That'd also make sure we're returning the reason that the policy code actually used to reject.

    Kevin McNee

    It's the same as NavigationHandle::GetURL which is commented as changing for redirects.

    Gerrit-Comment-Date: Tue, 04 Nov 2025 22:42:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: David Bokan <bo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Joshua Thomas (Gerrit)

    unread,
    9:49 AM (6 hours ago) 9:49 AM
    to Chromium LUCI CQ, David Bokan, Kevin McNee, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from David Bokan, Kevin McNee and Robert Ogden

    Joshua Thomas added 3 comments

    File chrome/browser/actor/actor_features.cc
    Line 35, Patchset 1: base::FEATURE_DISABLED_BY_DEFAULT);
    Robert Ogden . resolved

    let's enable by default to have this as a kill switch instead since we're blocking folks' work without this enabled

    Joshua Thomas

    Done

    File chrome/browser/actor/actor_navigation_throttle.cc
    Line 224, Patchset 1: navigation_handle()->IsExternalProtocol()) {
    Joshua Thomas . unresolved

    This easily gets us the external protocol error. If we want the error to be more generally "kSchemeBlocked", then we have to rework how we reject the decision callback

    (still shouldn't be too hard)

    Robert Ogden

    this seems good to me. I think "internal" non-http protocols like file:// and ftp:// can remain blocked under the url status code

    David Bokan

    +1 - though if you take my suggestion of plumbing the reason from the policy checker you'd need to make this check more granular in that code too (i.e. check IsExternal there). (plumbing the result code also ensures we're also looking at redirected URLs)

    Joshua Thomas

    Sounds good.

    Instead of plumbing the actual result code, I passed back a new `MayActOnUrlBlockReason` since not all callers may choose to apply a ActionResultCode (history tool's validate function) or they may choose to use different codes (EE satety checks use `kUrlBlocked` vs the `kTriggeredBlockedNavigation` for the throttle)

    I added block reasons for all of the different ones I saw, but let me know if you'd like some removed or split

    Line 224, Patchset 1: navigation_handle()->IsExternalProtocol()) {
    David Bokan . resolved

    This is based on common_params->url - do you know if that's updated for HTTP redirects? My guess would be no (but I'm not sure) so this won't be correct in cases where we get an HTTP redirect.

    Could we pass in the reason from the policy check? That'd also make sure we're returning the reason that the policy code actually used to reject.

    Kevin McNee

    It's the same as NavigationHandle::GetURL which is commented as changing for redirects.

    Joshua Thomas

    Ack

    Since we're passing back a blocked reason from site_policy.cc which doesn't have the NavigationHandle, I just did the underlying `ProfileIOData::IsHandledURL(url)` call directly on the url.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Bokan
    • Kevin McNee
    • Robert Ogden
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
      Gerrit-Change-Number: 7120367
      Gerrit-PatchSet: 3
      Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Joshua Thomas <masn...@chromium.org>
      Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Kevin McNee <mc...@chromium.org>
      Gerrit-Attention: Kevin McNee <mc...@chromium.org>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Attention: Robert Ogden <rober...@chromium.org>
      Gerrit-Comment-Date: Wed, 05 Nov 2025 14:49:03 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Kevin McNee <mc...@chromium.org>
      Comment-In-Reply-To: Joshua Thomas <masn...@chromium.org>
      Comment-In-Reply-To: David Bokan <bo...@chromium.org>
      Comment-In-Reply-To: Robert Ogden <rober...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      gwsq (Gerrit)

      unread,
      9:54 AM (6 hours ago) 9:54 AM
      to Joshua Thomas, Chromium IPC Reviews, Ken Buchanan, Abe Boujane, Chromium LUCI CQ, David Bokan, Kevin McNee, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Abe Boujane, David Bokan, Ken Buchanan, Kevin McNee and Robert Ogden

      Message from gwsq

      From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
      IPC: ke...@chromium.org

      📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

      IPC reviewer(s): ke...@chromium.org


      Reviewer source(s):
      ke...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abe Boujane
      • David Bokan
      • Ken Buchanan
      • Kevin McNee
      • Robert Ogden
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
      Gerrit-Change-Number: 7120367
      Gerrit-PatchSet: 3
      Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
      Gerrit-Reviewer: Abe Boujane <bou...@google.com>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Joshua Thomas <masn...@chromium.org>
      Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
      Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Kevin McNee <mc...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Kevin McNee <mc...@chromium.org>
      Gerrit-Attention: Ken Buchanan <ke...@chromium.org>
      Gerrit-Attention: David Bokan <bo...@chromium.org>
      Gerrit-Attention: Robert Ogden <rober...@chromium.org>
      Gerrit-Attention: Abe Boujane <bou...@google.com>
      Gerrit-Comment-Date: Wed, 05 Nov 2025 14:54:35 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Ken Buchanan (Gerrit)

      unread,
      10:07 AM (5 hours ago) 10:07 AM
      to Joshua Thomas, Chromium IPC Reviews, Abe Boujane, Chromium LUCI CQ, David Bokan, Kevin McNee, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from Abe Boujane, David Bokan, Joshua Thomas, Kevin McNee and Robert Ogden

      Ken Buchanan voted and added 1 comment

      Votes added by Ken Buchanan

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 3 (Latest):
      Ken Buchanan . resolved

      mojom lgtm

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Abe Boujane
      • David Bokan
      • Joshua Thomas
      • Kevin McNee
      • Robert Ogden
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
        Gerrit-Change-Number: 7120367
        Gerrit-PatchSet: 3
        Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
        Gerrit-Reviewer: Abe Boujane <bou...@google.com>
        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
        Gerrit-Reviewer: Joshua Thomas <masn...@chromium.org>
        Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
        Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Kevin McNee <mc...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Kevin McNee <mc...@chromium.org>
        Gerrit-Attention: Joshua Thomas <masn...@chromium.org>
        Gerrit-Attention: David Bokan <bo...@chromium.org>
        Gerrit-Attention: Robert Ogden <rober...@chromium.org>
        Gerrit-Attention: Abe Boujane <bou...@google.com>
        Gerrit-Comment-Date: Wed, 05 Nov 2025 15:07:14 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Abe Boujane (Gerrit)

        unread,
        10:35 AM (5 hours ago) 10:35 AM
        to Joshua Thomas, Ken Buchanan, Chromium IPC Reviews, Chromium LUCI CQ, David Bokan, Kevin McNee, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from David Bokan, Joshua Thomas, Kevin McNee and Robert Ogden

        Abe Boujane voted and added 1 comment

        Votes added by Abe Boujane

        Code-Review+1

        1 comment

        Patchset-level comments
        Abe Boujane . resolved

        enums.xml LGTM

        Open in Gerrit

        Related details

        Attention is currently required from:
        Gerrit-Comment-Date: Wed, 05 Nov 2025 15:35:35 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        David Bokan (Gerrit)

        unread,
        10:57 AM (4 hours ago) 10:57 AM
        to Joshua Thomas, Kevin McNee, Abe Boujane, Ken Buchanan, Chromium IPC Reviews, Chromium LUCI CQ, Robert Ogden, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Joshua Thomas, Kevin McNee and Robert Ogden

        David Bokan voted and added 4 comments

        Votes added by David Bokan

        Code-Review+1

        4 comments

        Patchset-level comments
        David Bokan . resolved

        lgtm - wouldn't mind a second set of eyes over the site policy stuff from mcnee@

        File chrome/browser/actor/actor_navigation_throttle.cc
        Line 224, Patchset 1: navigation_handle()->IsExternalProtocol()) {
        Joshua Thomas . resolved

        This easily gets us the external protocol error. If we want the error to be more generally "kSchemeBlocked", then we have to rework how we reject the decision callback

        (still shouldn't be too hard)

        Robert Ogden

        this seems good to me. I think "internal" non-http protocols like file:// and ftp:// can remain blocked under the url status code

        David Bokan

        +1 - though if you take my suggestion of plumbing the reason from the policy checker you'd need to make this check more granular in that code too (i.e. check IsExternal there). (plumbing the result code also ensures we're also looking at redirected URLs)

        Joshua Thomas

        Sounds good.

        Instead of plumbing the actual result code, I passed back a new `MayActOnUrlBlockReason` since not all callers may choose to apply a ActionResultCode (history tool's validate function) or they may choose to use different codes (EE satety checks use `kUrlBlocked` vs the `kTriggeredBlockedNavigation` for the throttle)

        I added block reasons for all of the different ones I saw, but let me know if you'd like some removed or split

        David Bokan

        looks good, thanks!

        File chrome/browser/actor/actor_policy_checker.h
        Line 36, Patchset 3 (Parent): // TODO(crbug.com/448384918): The callback should return the explicit error
        David Bokan . unresolved

        Seems we can tag this bug in the commit message

        File chrome/browser/actor/site_policy.h
        Line 65, Patchset 3 (Latest):void MayActOnUrl(const GURL& url,
        David Bokan . unresolved

        This is kept because of usage in history and navigate tools? Please leave a TODO to move those to take a MayActOnUrlBlockReason

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joshua Thomas
        • Kevin McNee
        • Robert Ogden
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
        Gerrit-Change-Number: 7120367
        Gerrit-PatchSet: 3
        Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
        Gerrit-Reviewer: Abe Boujane <bou...@google.com>
        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
        Gerrit-Reviewer: Joshua Thomas <masn...@chromium.org>
        Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
        Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
        Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Kevin McNee <mc...@chromium.org>
        Gerrit-Attention: Joshua Thomas <masn...@chromium.org>
        Gerrit-Attention: Robert Ogden <rober...@chromium.org>
        Gerrit-Comment-Date: Wed, 05 Nov 2025 15:57:52 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Robert Ogden (Gerrit)

        unread,
        11:30 AM (4 hours ago) 11:30 AM
        to Joshua Thomas, Kevin McNee, David Bokan, Abe Boujane, Ken Buchanan, Chromium IPC Reviews, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Joshua Thomas and Kevin McNee

        Robert Ogden voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joshua Thomas
        • Kevin McNee
        Gerrit-Comment-Date: Wed, 05 Nov 2025 16:29:53 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Joshua Thomas (Gerrit)

        unread,
        11:44 AM (4 hours ago) 11:44 AM
        to Robert Ogden, Kevin McNee, David Bokan, Abe Boujane, Ken Buchanan, Chromium IPC Reviews, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Kevin McNee

        Joshua Thomas added 3 comments

        Patchset-level comments
        David Bokan . resolved

        lgtm - wouldn't mind a second set of eyes over the site policy stuff from mcnee@

        Joshua Thomas

        Ack, I'll wait for his review before submitting

        File chrome/browser/actor/actor_policy_checker.h
        Line 36, Patchset 3 (Parent): // TODO(crbug.com/448384918): The callback should return the explicit error
        David Bokan . resolved

        Seems we can tag this bug in the commit message

        Joshua Thomas

        Done

        File chrome/browser/actor/site_policy.h
        Line 65, Patchset 3:void MayActOnUrl(const GURL& url,
        David Bokan . resolved

        This is kept because of usage in history and navigate tools? Please leave a TODO to move those to take a MayActOnUrlBlockReason

        Joshua Thomas

        Right. I filed a bug to cleanup and added the TODO here. Thanks

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Kevin McNee
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
          Gerrit-Change-Number: 7120367
          Gerrit-PatchSet: 5
          Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
          Gerrit-Reviewer: Abe Boujane <bou...@google.com>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Joshua Thomas <masn...@chromium.org>
          Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
          Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Attention: Kevin McNee <mc...@chromium.org>
          Gerrit-Comment-Date: Wed, 05 Nov 2025 16:44:47 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: David Bokan <bo...@chromium.org>
          satisfied_requirement
          open
          diffy

          Kevin McNee (Gerrit)

          unread,
          2:39 PM (1 hour ago) 2:39 PM
          to Joshua Thomas, Robert Ogden, David Bokan, Abe Boujane, Ken Buchanan, Chromium IPC Reviews, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org
          Attention needed from Joshua Thomas

          Kevin McNee voted and added 3 comments

          Votes added by Kevin McNee

          Code-Review+1

          3 comments

          Patchset-level comments
          File-level comment, Patchset 5 (Latest):
          Kevin McNee . resolved

          LGTM, thanks.

          (No need to address nits if you'd rather submit as is.)

          File chrome/browser/actor/actor_navigation_throttle.h
          Line 57, Patchset 5 (Latest): actor::MayActOnUrlBlockReason block_reason);
          Kevin McNee . unresolved

          nit: Redundant namespace.

          File chrome/browser/actor/site_policy.cc
          Line 310, Patchset 5 (Latest): std::move(callback)));
          Kevin McNee . unresolved

          Optional nit: I think we could use OnceCallback::Then to make this more concise. (Same on line 353)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Joshua Thomas
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
            Gerrit-Change-Number: 7120367
            Gerrit-PatchSet: 5
            Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
            Gerrit-Reviewer: Abe Boujane <bou...@google.com>
            Gerrit-Reviewer: David Bokan <bo...@chromium.org>
            Gerrit-Reviewer: Joshua Thomas <masn...@chromium.org>
            Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
            Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
            Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
            Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-CC: gwsq
            Gerrit-Attention: Joshua Thomas <masn...@chromium.org>
            Gerrit-Comment-Date: Wed, 05 Nov 2025 19:39:40 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Joshua Thomas (Gerrit)

            unread,
            2:54 PM (1 hour ago) 2:54 PM
            to Kevin McNee, Robert Ogden, David Bokan, Abe Boujane, Ken Buchanan, Chromium IPC Reviews, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org

            Joshua Thomas added 2 comments

            File chrome/browser/actor/actor_navigation_throttle.h
            Line 57, Patchset 5: actor::MayActOnUrlBlockReason block_reason);
            Kevin McNee . resolved

            nit: Redundant namespace.

            Joshua Thomas

            Thanks. Done

            File chrome/browser/actor/site_policy.cc
            Line 310, Patchset 5: std::move(callback)));
            Kevin McNee . resolved

            Optional nit: I think we could use OnceCallback::Then to make this more concise. (Same on line 353)

            Joshua Thomas

            Ah nice, thanks!

            Open in Gerrit

            Related details

            Attention set is empty
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement satisfiedCode-Owners
              • requirement satisfiedCode-Review
              • requirement satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: I49f3bfbe22a532d177a9e8be1178adb4672aa22d
              Gerrit-Change-Number: 7120367
              Gerrit-PatchSet: 6
              Gerrit-Owner: Joshua Thomas <masn...@chromium.org>
              Gerrit-Reviewer: Abe Boujane <bou...@google.com>
              Gerrit-Reviewer: David Bokan <bo...@chromium.org>
              Gerrit-Reviewer: Joshua Thomas <masn...@chromium.org>
              Gerrit-Reviewer: Ken Buchanan <ke...@chromium.org>
              Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
              Gerrit-Reviewer: Robert Ogden <rober...@chromium.org>
              Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
              Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
              Gerrit-CC: gwsq
              Gerrit-Comment-Date: Wed, 05 Nov 2025 19:54:51 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Kevin McNee <mc...@chromium.org>
              satisfied_requirement
              open
              diffy

              Joshua Thomas (Gerrit)

              unread,
              2:55 PM (1 hour ago) 2:55 PM
              to Kevin McNee, Robert Ogden, David Bokan, Abe Boujane, Ken Buchanan, Chromium IPC Reviews, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org, ipc-securi...@chromium.org, mfoltz+wa...@chromium.org

              Joshua Thomas voted Commit-Queue+2

              Commit-Queue+2
              Gerrit-Comment-Date: Wed, 05 Nov 2025 19:54:53 +0000
              Gerrit-HasComments: No
              Gerrit-Has-Labels: Yes
              satisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages