Exclude ad frames from origin-keyed processes by default. [chromium/src : main]

0 views
Skip to first unread message

Liam Brady (Gerrit)

unread,
Jul 6, 2026, 7:08:00 PMJul 6
to Code Review Nudger, Charlie Reis, Alex Moshchuk, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
Attention needed from Alex Moshchuk and Charlie Reis

Liam Brady added 9 comments

File chrome/browser/site_isolation/origin_agent_cluster_browsertest.cc
Line 95, Patchset 9: return buckets.size() == 1U ? buckets[0].min : 0;
Charlie Reis . resolved

Why did this helper function change? Was it just meaningless before (by not consulting the histogram samples), unrelated to the changes in this CL? If so, maybe we can land it first with an explanation, to be clear it's not a behavior change related to the other changes.

Liam Brady

At this point, I don't remember why I changed this. The latest iteration has some failing tests that seems to be resolved by changing this back. The original method is doing some weird histogram checking to make sure they're being logged properly, but I think the logic is still sound there, so I'm going to change this back.

As embarrassed as I am to admit it, I think this might be some LLM change from when I was trying to get some tests fixed that I completely missed. go/stake-your-reputation

Line 589, Patchset 9:// Ad frames should not be site-keyed by default.
Charlie Reis . resolved

should be, I think?

Liam Brady

Done

Line 609, Patchset 6: ad_waiter.Wait();
Alex Moshchuk . resolved

Any risk that the ad tagging doesn't get to start before we suspend the navigation with WaitForRequestStart(), and then doesn't get kicked off at all? Would it be safer to call ResumeNavigation() first?

Liam Brady

Resolving as I think we can get away without the ad tagging waiter altogether.

Line 620, Patchset 6:// non-ad frame that has been origin-keyed.
Alex Moshchuk . resolved

I'm not sure about the premise of this test. I think for cases like ad.bar.com(ad_not_on_easylist.bar.com), we wanted ad_not_on_easylist.bar.com to be site-keyed if there was a same-site ancestor ad frame that was site-keyed (and we'll eventually want a test for this - but it doesn't look like this logic is part of this CL). But I'm not sure why we'd want this case to force ad.bar.com to be origin-keyed because it has an origin-keyed same-site sibling frame. Why couldn't we keep the ad as site-keyed in this case? With OAC state being per-origin, it doesn't seem like other.bar.com being origin-keyed should force ad.bar.com to be origin-keyed as well. We also wouldn't want a case like microsoft.com(ad.microsoft.com) to be affected, right? That latter one is probably worth covering in a separate test here.

Charlie Reis

I agree-- I think I would expect ad.bar.com to be site-keyed in this test, unless I'm missing the reason why it shouldn't be.

Liam Brady

I was thinking that a decision for a site should affect all origins within that site, which is why I had originally added this test. Now that I'm thinking about it, a sibling shouldn't be able to affect other siblings, especially if they're cross-origin, so I'll update this.

File components/subresource_filter/content/browser/child_frame_navigation_filtering_throttle.h
Line 80, Patchset 9: virtual void OnCalculatedLoadPolicyFinished();
Charlie Reis . resolved

I found it a bit unexpected that this is in the middle of some pure virtual functions but it defines an implementation in this class, only to have that overridden in SafeBrowsingChildNavigationThrottle. Is that intentional to provide a default implementation for other derived classes?

I see the overridden version calls this one, but if we always expect the overrides to call that, maybe we should make this pure virtual and put the base implementation into a different function of ChildFrameNavigationFilteringThrottle.

Liam Brady

Done. All the logic is now in `SafeBrowsingChildNavigationThrottle::OnCalculatedLoadPolicyFinished`.

File components/subresource_filter/content/browser/subresource_filter_observer_test_utils.cc
Line 49, Patchset 6:void TestSubresourceFilterObserver::OnSubframeEvaluationComplete(
Alex Moshchuk . resolved

Is there a difference between this new method and OnChildFrameNavigationEvaluated, such that we couldn't just reuse OnChildFrameNavigationEvaluated?

Liam Brady

I think we might be able to get away without having any observers at all, and just wait for the navigation to finish and check to see what kind of process keying we ended up getting.

I think my original understanding of how the ad tagger works was not fully accurate. It seems that if we have navigation throttles in place, there is blocking happening on the navigation until we have a verdict on whether something is an ad or not, so I think we can just do a normal navigation and not pause it to give the ad tagger time to come up with a decision. I'm going to remove this entirely and see how the bots do, and if they aren't flaking then I think we can greatly simplify how the testing is done.

File content/browser/renderer_host/navigation_request.cc
Line 3923, Patchset 6: SiteIsolationPolicy::AreOriginAgentClustersEnabledByDefault(
Alex Moshchuk . resolved

One more question, credit to Gemini: does this also need to check that origin-keyed processes are enabled by default, e.g. with `AreOriginKeyedProcessesEnabledByDefault()`? If they aren't, it doesn't seem like we need to change any behavior for ads, do we?

Suppose logical OAC is enabled but origin-keyed processes are disabled (e.g., Android), and suppose an ad frame navigates. We'll enter this block and set oac_isolation_state to logical OAC (i.e., OAC without process isolation). Then we'll call AddOriginAgentClusterStateForBrowsingInstance(), and hit your new `DCHECK(oac_isolation_state != isolation_context.default_isolation_state());`, which seems like it will fail because both states are equivalent to `CreateForOriginAgentCluster(false, false)`. (Let's try to cover this case in a test as well.)

Charlie Reis

Looks like this was fixed between PS6 and PS9, possibly apart from adding a test for it.

Liam Brady

I've added a test for this case. I also put these tests under an `OriginAgentClusterAdBrowserTest` test class just to make inheritance a bit simpler since we're now juggling both the `OriginAgentClusterOacOnlyBrowserTest` class and `OriginKeyedProcessByDefaultBrowserTest` class, which both need ad methods. Feel free to bikeshed the names if you think they can be better.

File content/browser/site_info.cc
Line 898, Patchset 6: !url_info.oac_header_request.has_value()) {
Alex Moshchuk . resolved

Suppose there was no OAC header and the `oac_isolation_state` was assigned to `isolation_context.default_isolation_state()` two lines above. Also suppose that OAC is globally disabled (e.g., via enterprise policy). Wouldn't we want to skip this override in that case, since otherwise we'd be turning logical OAC on for ads and making them origin-keyed in the renderer (while keeping in the same process), and breaking document.domain for them while keeping it working for everything else? Should there be an additional check similar to `oac_isolation_state.is_origin_agent_cluster()` here?

Liam Brady

I'll add an `is_origin_agent_cluster()` check to this statement.

File content/browser/url_info.h
Line 168, Patchset 9: bool is_ad_tagged = false;
Charlie Reis . resolved

Are you planning to rename these along the lines of `matches_ad_filter_with_host_` in a future CL, or should we do that here to be consistent with chrome_track_event.proto?

Liam Brady

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Charlie Reis
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • 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: I1613cdcf72e044aef324657c504def619ae43ba8
Gerrit-Change-Number: 7615529
Gerrit-PatchSet: 12
Gerrit-Owner: Liam Brady <lbr...@google.com>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
Gerrit-Reviewer: Liam Brady <lbr...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Charlie Reis <cr...@chromium.org>
Gerrit-Comment-Date: Mon, 06 Jul 2026 23:07:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
Comment-In-Reply-To: Charlie Reis <cr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Charlie Reis (Gerrit)

unread,
Jul 10, 2026, 2:16:04 PMJul 10
to Liam Brady, Code Review Nudger, Alex Moshchuk, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
Attention needed from Alex Moshchuk and Liam Brady

Charlie Reis voted and added 10 comments

Votes added by Charlie Reis

Code-Review+1

10 comments

Patchset-level comments
File-level comment, Patchset 13 (Latest):
Charlie Reis . resolved

Thanks! content/ LGTM with the questions and changes below.

File chrome/browser/site_isolation/origin_agent_cluster_browsertest.cc
Line 166, Patchset 13 (Latest): : enable_origin_agent_cluster_(enable_oac) {
Charlie Reis . unresolved

Should we require `enable_oac` to be true (with a CHECK) if `enable_origin_keyed_processes` is true?

Line 169, Patchset 13 (Latest): // BrowsingInstances.
Charlie Reis . unresolved

Maybe mention the new subresource_filter features as well, which I'm guessing are a pre-req for the ad exclusion logic? Or, do we only need them enabled in the case that we're enabling kExcludeAdsFromOriginIsolation below, and we can move them down there?

Line 189, Patchset 13 (Latest): if (enable_oac || enable_origin_keyed_processes) {
Charlie Reis . unresolved

Just curious: do we need this clause? I wouldn't expect kExcludeAdsFromOriginIsolation to affect `enable_oac` behavior if `enable_origin_keyed_processes` isn't enabled, since it should only affect process selection and not agent cluster behavior.

Or is it needed for the new test at the end? If so, that might be worth a comment.

Line 591, Patchset 13 (Latest): EXPECT_FALSE(content::HasOriginKeyedProcess(child));
Charlie Reis . unresolved

Let's include an expectation that the main frame has an origin keyed process, in contrast.

Line 630, Patchset 13 (Latest): EXPECT_FALSE(content::HasOriginKeyedProcess(child));
Charlie Reis . unresolved

Thanks, this is great now. Can we add a version of this test where `other.bar.com` is a subframe of `ad.bar.com`? I think we were on the fence about whether to make the nested frame site-keyed or not, and we might have decided to do that (in the hopes of reducing process count in a common case without adding too much attack surface)? If the full implementation of that policy isn't done yet, we can have a TODO in the test for what we want the outcome to be.

File components/subresource_filter/content/browser/subresource_filter_observer_manager.h
Line 8, Patchset 13 (Latest):#include "base/functional/callback.h"
Charlie Reis . unresolved

nit: Do we still need any changes in this file?

File content/browser/renderer_host/navigation_request.h
Line 3573, Patchset 13 (Latest): // advertising purposes.
Charlie Reis . unresolved

It might be worth elaborating on the conditions here (based on the new name), or maybe starting with a TODO that this will be limited to cases where the ad filter detected it based on the host and not just an arbitrary URL pattern or other dynamic state about the frame.

File content/browser/renderer_host/navigation_request.cc
Line 3923, Patchset 6: SiteIsolationPolicy::AreOriginAgentClustersEnabledByDefault(
Alex Moshchuk . resolved

One more question, credit to Gemini: does this also need to check that origin-keyed processes are enabled by default, e.g. with `AreOriginKeyedProcessesEnabledByDefault()`? If they aren't, it doesn't seem like we need to change any behavior for ads, do we?

Suppose logical OAC is enabled but origin-keyed processes are disabled (e.g., Android), and suppose an ad frame navigates. We'll enter this block and set oac_isolation_state to logical OAC (i.e., OAC without process isolation). Then we'll call AddOriginAgentClusterStateForBrowsingInstance(), and hit your new `DCHECK(oac_isolation_state != isolation_context.default_isolation_state());`, which seems like it will fail because both states are equivalent to `CreateForOriginAgentCluster(false, false)`. (Let's try to cover this case in a test as well.)

Charlie Reis

Looks like this was fixed between PS6 and PS9, possibly apart from adding a test for it.

Liam Brady

I've added a test for this case. I also put these tests under an `OriginAgentClusterAdBrowserTest` test class just to make inheritance a bit simpler since we're now juggling both the `OriginAgentClusterOacOnlyBrowserTest` class and `OriginKeyedProcessByDefaultBrowserTest` class, which both need ad methods. Feel free to bikeshed the names if you think they can be better.

Charlie Reis

Thanks for the test!

File content/browser/url_info.h
Line 167, Patchset 13 (Latest): // matching a known ad URL. This only includes filters who match a domain, and
// does not include partial matches.
Charlie Reis . unresolved

Should this be a TODO until that behavior is added?

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Liam Brady
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: I1613cdcf72e044aef324657c504def619ae43ba8
    Gerrit-Change-Number: 7615529
    Gerrit-PatchSet: 13
    Gerrit-Owner: Liam Brady <lbr...@google.com>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
    Gerrit-Reviewer: Liam Brady <lbr...@google.com>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Attention: Liam Brady <lbr...@google.com>
    Gerrit-Comment-Date: Fri, 10 Jul 2026 18:15:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
    Comment-In-Reply-To: Liam Brady <lbr...@google.com>
    Comment-In-Reply-To: Charlie Reis <cr...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Liam Brady (Gerrit)

    unread,
    Jul 10, 2026, 7:17:29 PMJul 10
    to Charlie Reis, Code Review Nudger, Alex Moshchuk, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
    Attention needed from Alex Moshchuk and Charlie Reis

    Liam Brady added 8 comments

    File chrome/browser/site_isolation/origin_agent_cluster_browsertest.cc
    Line 166, Patchset 13: : enable_origin_agent_cluster_(enable_oac) {
    Charlie Reis . resolved

    Should we require `enable_oac` to be true (with a CHECK) if `enable_origin_keyed_processes` is true?

    Liam Brady

    Done

    Line 169, Patchset 13: // BrowsingInstances.
    Charlie Reis . resolved

    Maybe mention the new subresource_filter features as well, which I'm guessing are a pre-req for the ad exclusion logic? Or, do we only need them enabled in the case that we're enabling kExcludeAdsFromOriginIsolation below, and we can move them down there?

    Liam Brady

    Good point. I moved them so they're only enabled if `kExcludeAdsFromOriginIsolation` is also enabled.

    Line 189, Patchset 13: if (enable_oac || enable_origin_keyed_processes) {
    Charlie Reis . resolved

    Just curious: do we need this clause? I wouldn't expect kExcludeAdsFromOriginIsolation to affect `enable_oac` behavior if `enable_origin_keyed_processes` isn't enabled, since it should only affect process selection and not agent cluster behavior.

    Or is it needed for the new test at the end? If so, that might be worth a comment.

    Liam Brady

    This is needed for the crash test at the end. I've added a comment explaining that.

    Line 591, Patchset 13: EXPECT_FALSE(content::HasOriginKeyedProcess(child));
    Charlie Reis . resolved

    Let's include an expectation that the main frame has an origin keyed process, in contrast.

    Liam Brady

    Done

    Line 630, Patchset 13: EXPECT_FALSE(content::HasOriginKeyedProcess(child));
    Charlie Reis . resolved

    Thanks, this is great now. Can we add a version of this test where `other.bar.com` is a subframe of `ad.bar.com`? I think we were on the fence about whether to make the nested frame site-keyed or not, and we might have decided to do that (in the hopes of reducing process count in a common case without adding too much attack surface)? If the full implementation of that policy isn't done yet, we can have a TODO in the test for what we want the outcome to be.

    Liam Brady

    Added a test for this case.

    File components/subresource_filter/content/browser/subresource_filter_observer_manager.h
    Line 8, Patchset 13:#include "base/functional/callback.h"
    Charlie Reis . resolved

    nit: Do we still need any changes in this file?

    Liam Brady

    Not anymore. I'll revert this.

    File content/browser/renderer_host/navigation_request.h
    Line 3573, Patchset 13: // advertising purposes.
    Charlie Reis . resolved

    It might be worth elaborating on the conditions here (based on the new name), or maybe starting with a TODO that this will be limited to cases where the ad filter detected it based on the host and not just an arbitrary URL pattern or other dynamic state about the frame.

    Liam Brady

    Now that I'm looking at this again, I think we should keep this untouched as `is_ad_tagged_` and then add the `matches_ad_filter_with_host_` boolean in the follow up CL. Since renaming this now doesn't really make any sense.

    The TODO added to `content/browser/url_info.h` should be a sufficient documentation of that future effort.

    File content/browser/url_info.h
    Line 167, Patchset 13: // matching a known ad URL. This only includes filters who match a domain, and

    // does not include partial matches.
    Charlie Reis . resolved

    Should this be a TODO until that behavior is added?

    Liam Brady

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    • Charlie Reis
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • 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: I1613cdcf72e044aef324657c504def619ae43ba8
      Gerrit-Change-Number: 7615529
      Gerrit-PatchSet: 14
      Gerrit-Owner: Liam Brady <lbr...@google.com>
      Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
      Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
      Gerrit-Reviewer: Liam Brady <lbr...@google.com>
      Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
      Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
      Gerrit-Attention: Charlie Reis <cr...@chromium.org>
      Gerrit-Comment-Date: Fri, 10 Jul 2026 23:17:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Charlie Reis <cr...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Charlie Reis (Gerrit)

      unread,
      Jul 13, 2026, 2:45:09 PM (13 days ago) Jul 13
      to Liam Brady, Code Review Nudger, Alex Moshchuk, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
      Attention needed from Alex Moshchuk and Liam Brady

      Charlie Reis voted and added 2 comments

      Votes added by Charlie Reis

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 14 (Latest):
      Charlie Reis . resolved

      Thanks! Still LGTM, though you'll need another reviewer for the components/subresource_filter files.

      File content/browser/renderer_host/navigation_request.h
      Line 3573, Patchset 13: // advertising purposes.
      Charlie Reis . resolved

      It might be worth elaborating on the conditions here (based on the new name), or maybe starting with a TODO that this will be limited to cases where the ad filter detected it based on the host and not just an arbitrary URL pattern or other dynamic state about the frame.

      Liam Brady

      Now that I'm looking at this again, I think we should keep this untouched as `is_ad_tagged_` and then add the `matches_ad_filter_with_host_` boolean in the follow up CL. Since renaming this now doesn't really make any sense.

      The TODO added to `content/browser/url_info.h` should be a sufficient documentation of that future effort.

      Charlie Reis

      Sure, sounds good.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Moshchuk
      • Liam Brady
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: I1613cdcf72e044aef324657c504def619ae43ba8
        Gerrit-Change-Number: 7615529
        Gerrit-PatchSet: 14
        Gerrit-Owner: Liam Brady <lbr...@google.com>
        Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
        Gerrit-Reviewer: Liam Brady <lbr...@google.com>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
        Gerrit-Attention: Liam Brady <lbr...@google.com>
        Gerrit-Comment-Date: Mon, 13 Jul 2026 18:44:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Alex Moshchuk (Gerrit)

        unread,
        Jul 14, 2026, 8:10:24 PM (12 days ago) Jul 14
        to Liam Brady, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
        Attention needed from Liam Brady

        Alex Moshchuk voted and added 2 comments

        Votes added by Alex Moshchuk

        Code-Review+1

        2 comments

        Patchset-level comments
        Alex Moshchuk . resolved

        Just caught up on this CL and it looks great. LGTM as well!

        File chrome/browser/site_isolation/origin_agent_cluster_browsertest.cc
        Line 194, Patchset 14 (Latest): if (enable_oac || enable_origin_keyed_processes) {
        Alex Moshchuk . unresolved

        The CHECK on line 169 guarantees that this is equivalent to just `enable_oac`, so we could simplify this to that.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Liam Brady
        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: I1613cdcf72e044aef324657c504def619ae43ba8
          Gerrit-Change-Number: 7615529
          Gerrit-PatchSet: 14
          Gerrit-Owner: Liam Brady <lbr...@google.com>
          Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
          Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
          Gerrit-Reviewer: Liam Brady <lbr...@google.com>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Liam Brady <lbr...@google.com>
          Gerrit-Comment-Date: Wed, 15 Jul 2026 00:10:13 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Liam Brady (Gerrit)

          unread,
          Jul 15, 2026, 3:44:35 PM (11 days ago) Jul 15
          to Alex Turner, Daniel Cheng, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
          Attention needed from Alex Turner and Daniel Cheng

          Liam Brady added 2 comments

          Patchset-level comments
          File-level comment, Patchset 15 (Latest):
          Liam Brady . resolved

          dcheng@: PTAL at `chrome_track_event.proto`.

          alexmt@: PTAL at the following files:

          • child_frame_navigation_filtering_throttle.h
          • child_frame_navigation_filtering_throttle.cc
          • child_frame_navigation_filtering_throttle_unittest.cc
          • safe_browsing_child_navigation_throttle.h
          • safe_browsing_child_navigation_throttle.cc

          Thanks!

          File chrome/browser/site_isolation/origin_agent_cluster_browsertest.cc
          Line 194, Patchset 14: if (enable_oac || enable_origin_keyed_processes) {
          Alex Moshchuk . resolved

          The CHECK on line 169 guarantees that this is equivalent to just `enable_oac`, so we could simplify this to that.

          Liam Brady

          Done. I've moved this to the `if (enable_oac)` block above.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Alex Turner
          • Daniel Cheng
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: I1613cdcf72e044aef324657c504def619ae43ba8
            Gerrit-Change-Number: 7615529
            Gerrit-PatchSet: 15
            Gerrit-Owner: Liam Brady <lbr...@google.com>
            Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
            Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
            Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Attention: Alex Turner <ale...@chromium.org>
            Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
            Gerrit-Comment-Date: Wed, 15 Jul 2026 19:44:22 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Daniel Cheng (Gerrit)

            unread,
            Jul 15, 2026, 3:57:38 PM (11 days ago) Jul 15
            to Liam Brady, Daniel Cheng, Alex Turner, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
            Attention needed from Alex Turner and Liam Brady

            Daniel Cheng voted and added 1 comment

            Votes added by Daniel Cheng

            Code-Review+1

            1 comment

            Patchset-level comments
            Daniel Cheng . resolved

            LGTM

            Something something layering violation

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Alex Turner
            • Liam Brady
            Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not 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: I1613cdcf72e044aef324657c504def619ae43ba8
            Gerrit-Change-Number: 7615529
            Gerrit-PatchSet: 15
            Gerrit-Owner: Liam Brady <lbr...@google.com>
            Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
            Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
            Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
            Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
            Gerrit-Reviewer: Liam Brady <lbr...@google.com>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-Attention: Liam Brady <lbr...@google.com>
            Gerrit-Attention: Alex Turner <ale...@chromium.org>
            Gerrit-Comment-Date: Wed, 15 Jul 2026 19:57:25 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Alex Turner (Gerrit)

            unread,
            Jul 16, 2026, 4:41:05 PM (10 days ago) Jul 16
            to Liam Brady, Daniel Cheng, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
            Attention needed from Liam Brady

            Alex Turner added 2 comments

            File components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.cc
            Line 98, Patchset 15 (Latest):void SafeBrowsingChildNavigationThrottle::OnCalculatedLoadPolicyFinished() {
            Alex Turner . unresolved

            Could you explain the switch being made here? I'm a little confused, but it's also been a while since I touched this code.

            Line 109, Patchset 15 (Latest):void SafeBrowsingChildNavigationThrottle::
            Alex Turner . unresolved

            Does this still need to be defined?

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Liam Brady
            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: I1613cdcf72e044aef324657c504def619ae43ba8
              Gerrit-Change-Number: 7615529
              Gerrit-PatchSet: 15
              Gerrit-Owner: Liam Brady <lbr...@google.com>
              Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
              Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
              Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
              Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
              Gerrit-Reviewer: Liam Brady <lbr...@google.com>
              Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
              Gerrit-Attention: Liam Brady <lbr...@google.com>
              Gerrit-Comment-Date: Thu, 16 Jul 2026 20:40:58 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Liam Brady (Gerrit)

              unread,
              Jul 17, 2026, 12:26:15 AM (10 days ago) Jul 17
              to Daniel Cheng, Alex Turner, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
              Attention needed from Alex Turner

              Liam Brady added 2 comments

              File components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.cc
              Line 98, Patchset 15:void SafeBrowsingChildNavigationThrottle::OnCalculatedLoadPolicyFinished() {
              Alex Turner . resolved

              Could you explain the switch being made here? I'm a little confused, but it's also been a while since I touched this code.

              Liam Brady

              (It's also been a while since I originally wrote this) There were two reasons I needed to make this change.

              We want to get this information to the `NavigationRequest` object as soon as possible to give it the best chance at having that information when it needs to select a process. Doing this moves this notification call earlier in the navigation request. We explicitly decided to not affect navigation timing for this, and instead opt for a "best effort" approach. The OKPD ads exclusion feature is a performance optimization, and having a false negative because it didn't show up on time doesn't constitute a security risk, so we deemed this okay to do.

              We also needed to handle evaluations that were synchronous and non-deferred, which we needed in place for the browser tests I wrote to work.

              Line 109, Patchset 15:void SafeBrowsingChildNavigationThrottle::
              Alex Turner . resolved

              Does this still need to be defined?

              Liam Brady

              It looks like this is unused, so this should be safe to remove.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Alex Turner
              Submit Requirements:
                • requirement satisfiedCode-Coverage
                • requirement is not 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: I1613cdcf72e044aef324657c504def619ae43ba8
                Gerrit-Change-Number: 7615529
                Gerrit-PatchSet: 16
                Gerrit-Owner: Liam Brady <lbr...@google.com>
                Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
                Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
                Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
                Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                Gerrit-Reviewer: Liam Brady <lbr...@google.com>
                Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                Gerrit-Attention: Alex Turner <ale...@chromium.org>
                Gerrit-Comment-Date: Fri, 17 Jul 2026 04:26:02 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                Comment-In-Reply-To: Alex Turner <ale...@chromium.org>
                satisfied_requirement
                unsatisfied_requirement
                open
                diffy

                Alex Turner (Gerrit)

                unread,
                Jul 17, 2026, 1:15:51 PM (9 days ago) Jul 17
                to Liam Brady, Charles Harrison, Daniel Cheng, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                Attention needed from Charles Harrison and Liam Brady

                Alex Turner added 1 comment

                File components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.cc
                Line 98, Patchset 15:void SafeBrowsingChildNavigationThrottle::OnCalculatedLoadPolicyFinished() {
                Alex Turner . unresolved

                Could you explain the switch being made here? I'm a little confused, but it's also been a while since I touched this code.

                Liam Brady

                (It's also been a while since I originally wrote this) There were two reasons I needed to make this change.

                We want to get this information to the `NavigationRequest` object as soon as possible to give it the best chance at having that information when it needs to select a process. Doing this moves this notification call earlier in the navigation request. We explicitly decided to not affect navigation timing for this, and instead opt for a "best effort" approach. The OKPD ads exclusion feature is a performance optimization, and having a false negative because it didn't show up on time doesn't constitute a security risk, so we deemed this okay to do.

                We also needed to handle evaluations that were synchronous and non-deferred, which we needed in place for the browser tests I wrote to work.

                Alex Turner

                So there are two changes here:

                • one is to trigger on navigations that aren't being deferred
                • one is to trigger on navigations that will be cancelled

                To be honest, I'm a bit confused about the previous state. Navigations only seem to be being deferred if they activated (which I think means we're ad blocking them?). Do you know why we had that before?

                cc @cshar...@chromium.org for any thoughts

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Charles Harrison
                • Liam Brady
                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: I1613cdcf72e044aef324657c504def619ae43ba8
                  Gerrit-Change-Number: 7615529
                  Gerrit-PatchSet: 16
                  Gerrit-Owner: Liam Brady <lbr...@google.com>
                  Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
                  Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
                  Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: Liam Brady <lbr...@google.com>
                  Gerrit-CC: Charles Harrison <cshar...@chromium.org>
                  Gerrit-Attention: Liam Brady <lbr...@google.com>
                  Gerrit-Attention: Charles Harrison <cshar...@chromium.org>
                  Gerrit-Comment-Date: Fri, 17 Jul 2026 17:15:36 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Liam Brady <lbr...@google.com>
                  Comment-In-Reply-To: Alex Turner <ale...@chromium.org>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Charles Harrison (Gerrit)

                  unread,
                  Jul 20, 2026, 11:10:30 AM (6 days ago) Jul 20
                  to Liam Brady, Daniel Cheng, Alex Turner, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                  Attention needed from Liam Brady

                  Charles Harrison voted and added 1 comment

                  Votes added by Charles Harrison

                  Code-Review+1

                  1 comment

                  File components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.cc
                  Line 98, Patchset 15:void SafeBrowsingChildNavigationThrottle::OnCalculatedLoadPolicyFinished() {
                  Alex Turner . unresolved

                  Could you explain the switch being made here? I'm a little confused, but it's also been a while since I touched this code.

                  Liam Brady

                  (It's also been a while since I originally wrote this) There were two reasons I needed to make this change.

                  We want to get this information to the `NavigationRequest` object as soon as possible to give it the best chance at having that information when it needs to select a process. Doing this moves this notification call earlier in the navigation request. We explicitly decided to not affect navigation timing for this, and instead opt for a "best effort" approach. The OKPD ads exclusion feature is a performance optimization, and having a false negative because it didn't show up on time doesn't constitute a security risk, so we deemed this okay to do.

                  We also needed to handle evaluations that were synchronous and non-deferred, which we needed in place for the browser tests I wrote to work.

                  Alex Turner

                  So there are two changes here:

                  • one is to trigger on navigations that aren't being deferred
                  • one is to trigger on navigations that will be cancelled

                  To be honest, I'm a bit confused about the previous state. Navigations only seem to be being deferred if they activated (which I think means we're ad blocking them?). Do you know why we had that before?

                  cc @cshar...@chromium.org for any thoughts

                  Charles Harrison

                  The navigation is deferred if the parent frame is activated (i.e. we are doing ad blocking in them). This throttle is responsible for figuring out if we should block the navigation (or tag it as in ad in the ad tagging case).

                  That being said, I also don't fully understand this change. I'm not sure how we could possibly support synchronous navigations?

                  Which exact test breaks here?

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Liam Brady
                  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: I1613cdcf72e044aef324657c504def619ae43ba8
                  Gerrit-Change-Number: 7615529
                  Gerrit-PatchSet: 16
                  Gerrit-Owner: Liam Brady <lbr...@google.com>
                  Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
                  Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
                  Gerrit-Reviewer: Charles Harrison <cshar...@chromium.org>
                  Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: Liam Brady <lbr...@google.com>
                  Gerrit-Comment-Date: Mon, 20 Jul 2026 15:10:15 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Charles Harrison (Gerrit)

                  unread,
                  Jul 20, 2026, 11:10:45 AM (6 days ago) Jul 20
                  to Liam Brady, Daniel Cheng, Alex Turner, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                  Attention needed from Liam Brady

                  Charles Harrison voted and added 1 comment

                  Votes added by Charles Harrison

                  Code-Review+0

                  1 comment

                  Patchset-level comments
                  File-level comment, Patchset 16 (Latest):
                  Charles Harrison . resolved

                  oops sorry fat fingered the +1

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Liam Brady
                  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: I1613cdcf72e044aef324657c504def619ae43ba8
                  Gerrit-Change-Number: 7615529
                  Gerrit-PatchSet: 16
                  Gerrit-Owner: Liam Brady <lbr...@google.com>
                  Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
                  Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
                  Gerrit-Reviewer: Charles Harrison <cshar...@chromium.org>
                  Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
                  Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                  Gerrit-Reviewer: Liam Brady <lbr...@google.com>
                  Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                  Gerrit-Attention: Liam Brady <lbr...@google.com>
                  Gerrit-Comment-Date: Mon, 20 Jul 2026 15:10:32 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: Yes
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Liam Brady (Gerrit)

                  unread,
                  Jul 21, 2026, 6:35:55 PM (5 days ago) Jul 21
                  to Charles Harrison, Daniel Cheng, Alex Turner, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                  Attention needed from Alex Turner and Charles Harrison

                  Liam Brady added 1 comment

                  File components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.cc
                  Line 98, Patchset 15:void SafeBrowsingChildNavigationThrottle::OnCalculatedLoadPolicyFinished() {
                  Alex Turner . unresolved

                  Could you explain the switch being made here? I'm a little confused, but it's also been a while since I touched this code.

                  Liam Brady

                  (It's also been a while since I originally wrote this) There were two reasons I needed to make this change.

                  We want to get this information to the `NavigationRequest` object as soon as possible to give it the best chance at having that information when it needs to select a process. Doing this moves this notification call earlier in the navigation request. We explicitly decided to not affect navigation timing for this, and instead opt for a "best effort" approach. The OKPD ads exclusion feature is a performance optimization, and having a false negative because it didn't show up on time doesn't constitute a security risk, so we deemed this okay to do.

                  We also needed to handle evaluations that were synchronous and non-deferred, which we needed in place for the browser tests I wrote to work.

                  Alex Turner

                  So there are two changes here:

                  • one is to trigger on navigations that aren't being deferred
                  • one is to trigger on navigations that will be cancelled

                  To be honest, I'm a bit confused about the previous state. Navigations only seem to be being deferred if they activated (which I think means we're ad blocking them?). Do you know why we had that before?

                  cc @cshar...@chromium.org for any thoughts

                  Charles Harrison

                  The navigation is deferred if the parent frame is activated (i.e. we are doing ad blocking in them). This throttle is responsible for figuring out if we should block the navigation (or tag it as in ad in the ad tagging case).

                  That being said, I also don't fully understand this change. I'm not sure how we could possibly support synchronous navigations?

                  Which exact test breaks here?

                  Liam Brady

                  Which exact test breaks here?

                  3 of the tests I added are failing without this change. More specifically from the `OriginKeyedProcessByDefaultBrowserTest` suite:

                  • AdFrameSameSiteToOriginKeyedFrameIsSiteKeyed
                  • AdFramesDoNotOriginKey
                  • NestedSameSiteSubframeInsideAdFrameIsSiteKeyed

                  The only time that the associated `NavigationRequest` is notified that the request is for an ad is the [`navigation_handle()->SetIsAdTagged();` call in `OnReadyToResumeNavigationWithLoadPolicy()`](https://source.chromium.org/chromium/chromium/src/+/main:components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.cc;l=107;drc=b251030f22d6810f6755262d2182316f60552d60). If we don't need to defer the navigation to determine the ad status ([`DeferStage::kNotDeferring`](https://source.chromium.org/chromium/chromium/src/+/main:components/subresource_filter/content/browser/child_frame_navigation_filtering_throttle.h;l=66;drc=b251030f22d6810f6755262d2182316f60552d60)) (which I believe happens for ad **tagging**; the deferral only happens if we're **blocking** the ad), the browser-side navigation request is never notified about this. Up until this point, this was fine since [the RenderFrameHost is told about this at navigation commit time](https://source.chromium.org/chromium/chromium/src/+/main:components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc;l=784;drc=4df3b811351ed1ae108ba833da2322391ca3e558).

                  The issue is that the browser now needs this information when it's selecting what process to put the resulting frame in, regardless of whether we're deferring the navigation. Which would point to this notification needing to happen in `OnCalculatedLoadPolicyFinished` instead of `OnReadyToResumeNavigationWithLoadPolicy`.

                  For ad tagging itself (not ad blocking), since that runs in dry run mode, we don't defer, and instead just give the result to the RFH after the navigation finishes. This means that the navigations in the failing browser tests don't defer, so the `NavigationRequest` is never given the ad status, so it assumes this navigation isn't for an ad frame, and the resulting process is origin-keyed, which is incorrect.

                  That being said, I also don't fully understand this change. I'm not sure how we could possibly support synchronous navigations?

                  Ah, "synchronous" is referring to the load policy evaluation itself, i.e. we didn't need to defer the navigation in order to figure out whether the navigation is for an ad. I might've not used the best terminology here.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Alex Turner
                  • Charles Harrison
                  Gerrit-Attention: Alex Turner <ale...@chromium.org>
                  Gerrit-Attention: Charles Harrison <cshar...@chromium.org>
                  Gerrit-Comment-Date: Tue, 21 Jul 2026 22:35:40 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Liam Brady <lbr...@google.com>
                  Comment-In-Reply-To: Charles Harrison <cshar...@chromium.org>
                  Comment-In-Reply-To: Alex Turner <ale...@chromium.org>
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Alex Turner (Gerrit)

                  unread,
                  Jul 23, 2026, 10:15:39 PM (3 days ago) Jul 23
                  to Liam Brady, Charles Harrison, Daniel Cheng, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                  Attention needed from Alex Moshchuk, Charles Harrison, Charlie Reis, Daniel Cheng and Liam Brady

                  Alex Turner voted and added 2 comments

                  Votes added by Alex Turner

                  Code-Review+1

                  2 comments

                  Patchset-level comments
                  File-level comment, Patchset 18 (Latest):
                  Alex Turner . resolved

                  subresource_filter lgtm

                  File components/subresource_filter/content/browser/safe_browsing_child_navigation_throttle.cc
                  Line 98, Patchset 15:void SafeBrowsingChildNavigationThrottle::OnCalculatedLoadPolicyFinished() {
                  Alex Turner . resolved
                  Alex Turner

                  So, this ad tagging logic was only needed when we were blocking, but now we need that signal earlier. I think there's some complexity here if ad tagging is ever undo-able, but for now that's not possible. I think this seems ok to me, thanks for the detail.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Alex Moshchuk
                  • Charles Harrison
                  • Charlie Reis
                  • Daniel Cheng
                  • Liam Brady
                  Submit Requirements:
                    • requirement satisfiedCode-Coverage
                    • requirement is not 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: I1613cdcf72e044aef324657c504def619ae43ba8
                    Gerrit-Change-Number: 7615529
                    Gerrit-PatchSet: 18
                    Gerrit-Owner: Liam Brady <lbr...@google.com>
                    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
                    Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
                    Gerrit-Reviewer: Charles Harrison <cshar...@chromium.org>
                    Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
                    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                    Gerrit-Reviewer: Liam Brady <lbr...@google.com>
                    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
                    Gerrit-Attention: Liam Brady <lbr...@google.com>
                    Gerrit-Attention: Charles Harrison <cshar...@chromium.org>
                    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
                    Gerrit-Attention: Charlie Reis <cr...@chromium.org>
                    Gerrit-Comment-Date: Fri, 24 Jul 2026 02:15:06 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Daniel Cheng (Gerrit)

                    unread,
                    Jul 24, 2026, 3:18:08 PM (2 days ago) Jul 24
                    to Liam Brady, Daniel Cheng, Alex Turner, Charles Harrison, Alex Moshchuk, Charlie Reis, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                    Attention needed from Alex Moshchuk, Charles Harrison, Charlie Reis and Liam Brady

                    Daniel Cheng voted and added 1 comment

                    Votes added by Daniel Cheng

                    Code-Review+1

                    1 comment

                    Patchset-level comments
                    Daniel Cheng . resolved

                    still lgtm for the IPC change

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Alex Moshchuk
                    • Charles Harrison
                    • Charlie Reis
                    • Liam Brady
                    Gerrit-Attention: Charlie Reis <cr...@chromium.org>
                    Gerrit-Comment-Date: Fri, 24 Jul 2026 19:17:58 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Charlie Reis (Gerrit)

                    unread,
                    Jul 24, 2026, 4:07:44 PM (2 days ago) Jul 24
                    to Liam Brady, Daniel Cheng, Alex Turner, Charles Harrison, Alex Moshchuk, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                    Attention needed from Alex Moshchuk, Charles Harrison and Liam Brady

                    Charlie Reis voted and added 1 comment

                    Votes added by Charlie Reis

                    Code-Review+1

                    1 comment

                    Patchset-level comments
                    Charlie Reis . resolved

                    Thanks, content/ still LGTM.

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Alex Moshchuk
                    • Charles Harrison
                    • Liam Brady
                    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: I1613cdcf72e044aef324657c504def619ae43ba8
                    Gerrit-Change-Number: 7615529
                    Gerrit-PatchSet: 18
                    Gerrit-Owner: Liam Brady <lbr...@google.com>
                    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
                    Gerrit-Reviewer: Alex Turner <ale...@chromium.org>
                    Gerrit-Reviewer: Charles Harrison <cshar...@chromium.org>
                    Gerrit-Reviewer: Charlie Reis <cr...@chromium.org>
                    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
                    Gerrit-Reviewer: Liam Brady <lbr...@google.com>
                    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
                    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
                    Gerrit-Attention: Liam Brady <lbr...@google.com>
                    Gerrit-Attention: Charles Harrison <cshar...@chromium.org>
                    Gerrit-Comment-Date: Fri, 24 Jul 2026 20:07:31 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    open
                    diffy

                    Alex Moshchuk (Gerrit)

                    unread,
                    Jul 24, 2026, 5:58:52 PM (2 days ago) Jul 24
                    to Liam Brady, Charlie Reis, Daniel Cheng, Alex Turner, Charles Harrison, Code Review Nudger, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, devtools...@chromium.org, subresource-f...@chromium.org, alexmo...@chromium.org, creis...@chromium.org, ddrone...@google.com, navigation...@chromium.org
                    Attention needed from Charles Harrison and Liam Brady

                    Alex Moshchuk voted Code-Review+1

                    Code-Review+1
                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Charles Harrison
                    • Liam Brady
                    Gerrit-Attention: Liam Brady <lbr...@google.com>
                    Gerrit-Attention: Charles Harrison <cshar...@chromium.org>
                    Gerrit-Comment-Date: Fri, 24 Jul 2026 21:58:41 +0000
                    Gerrit-HasComments: No
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    open
                    diffy
                    Reply all
                    Reply to author
                    Forward
                    0 new messages