[VL] Inline and remove history::kVisitedLinksOn404 [chromium/src : main]

1 view
Skip to first unread message

Svend L (Gerrit)

unread,
Jul 31, 2026, 11:21:37 AMJul 31
to Kyra Seevers, Tiffany Song, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, extension...@chromium.org, alexmo...@chromium.org, chrome-intelligence-te...@google.com, browser-comp...@chromium.org, ayman...@chromium.org, ios-r...@chromium.org, chrome-intell...@chromium.org, mdjone...@chromium.org, navigation...@chromium.org, creis...@chromium.org, yuezhang...@chromium.org, marq+...@chromium.org, chromium-a...@chromium.org, ios-revie...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Kyra Seevers

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Kyra Seevers
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: I1fefd16e466519af7e3a52608bd991206a6a6964
Gerrit-Change-Number: 8106124
Gerrit-PatchSet: 9
Gerrit-Owner: Svend L <sv...@chromium.org>
Gerrit-Reviewer: Kyra Seevers <kyras...@chromium.org>
Gerrit-Reviewer: Svend L <sv...@chromium.org>
Gerrit-CC: Tiffany Song <tiffa...@google.com>
Gerrit-Attention: Kyra Seevers <kyras...@chromium.org>
Gerrit-Comment-Date: Fri, 31 Jul 2026 15:21:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kyra Seevers (Gerrit)

unread,
Jul 31, 2026, 11:55:32 AMJul 31
to Svend L, Tiffany Song, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, extension...@chromium.org, alexmo...@chromium.org, chrome-intelligence-te...@google.com, browser-comp...@chromium.org, ayman...@chromium.org, ios-r...@chromium.org, chrome-intell...@chromium.org, mdjone...@chromium.org, navigation...@chromium.org, creis...@chromium.org, yuezhang...@chromium.org, marq+...@chromium.org, chromium-a...@chromium.org, ios-revie...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
Attention needed from Svend L

Kyra Seevers voted and added 1 comment

Votes added by Kyra Seevers

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Kyra Seevers . resolved

Thanks for the cleanup - can't believe its been this long! LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Svend L
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: I1fefd16e466519af7e3a52608bd991206a6a6964
    Gerrit-Change-Number: 8106124
    Gerrit-PatchSet: 9
    Gerrit-Owner: Svend L <sv...@chromium.org>
    Gerrit-Reviewer: Kyra Seevers <kyras...@chromium.org>
    Gerrit-Reviewer: Svend L <sv...@chromium.org>
    Gerrit-CC: Tiffany Song <tiffa...@google.com>
    Gerrit-Attention: Svend L <sv...@chromium.org>
    Gerrit-Comment-Date: Fri, 31 Jul 2026 15:55:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    manuk hovanesian (Gerrit)

    unread,
    Aug 7, 2026, 12:58:00 PM (9 days ago) Aug 7
    to Svend L, Kyra Seevers, Tiffany Song, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, extension...@chromium.org, alexmo...@chromium.org, chrome-intelligence-te...@google.com, browser-comp...@chromium.org, ayman...@chromium.org, ios-r...@chromium.org, chrome-intell...@chromium.org, mdjone...@chromium.org, navigation...@chromium.org, creis...@chromium.org, yuezhang...@chromium.org, marq+...@chromium.org, chromium-a...@chromium.org, ios-revie...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
    Attention needed from Svend L

    manuk hovanesian added 5 comments

    File chrome/browser/history/history_tab_helper.cc
    Line 337, Patchset 10 (Parent): status_code_qualifies_for_ntp_most_visited &&
    manuk hovanesian . unresolved

    before:
    feature was enabled,
    so status_code_qualifies_for_ntp_most_visited was false,
    so should_consider_for_ntp_most_visited was always false.

    shouldn't we remove lines 326-331 to preserve current launch behavior?

    File components/history/core/browser/history_backend.cc
    Line 1258, Patchset 10 (Latest): // visits were excluded to avoid making a feature change to `VisitTracker`
    // at the same time as the change to make 404s eligible for History (before
    // that change, 404 visits were skipped upstream of this code).
    manuk hovanesian . unresolved

    optional nit, indent subsequent lines of todo comments

    ```
    // chains.
    // TODO...
    // visits were
    // at the same
    // that change
    // TODO
    // navigation
    // them
    ```

    File content/browser/renderer_host/render_frame_host_impl.cc
    Line 18469, Patchset 10 (Latest): const bool browser_should_update_history = !browser_url_is_unreachable;
    manuk hovanesian . unresolved

    can we dedupe these variables?

    File content/renderer/render_frame_impl.cc
    Line 5212, Patchset 10 (Latest): params->should_update_history = !document_loader->HasUnreachableURL();
    manuk hovanesian . unresolved

    optional, likewise, should we dedupe these variables

    File ios/chrome/browser/history/model/history_tab_helper.mm
    Line 125, Patchset 10 (Parent): const bool status_code_qualifies_for_ntp_most_visited =
    manuk hovanesian . unresolved

    this was false before, so shouldn't consider_for_ntp_most_visited also be false now to preserve launched behavior ?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Svend L
    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: I1fefd16e466519af7e3a52608bd991206a6a6964
      Gerrit-Change-Number: 8106124
      Gerrit-PatchSet: 10
      Gerrit-Owner: Svend L <sv...@chromium.org>
      Gerrit-Reviewer: Kyra Seevers <kyras...@chromium.org>
      Gerrit-Reviewer: Svend L <sv...@chromium.org>
      Gerrit-Reviewer: manuk hovanesian <man...@chromium.org>
      Gerrit-Comment-Date: Fri, 07 Aug 2026 16:57:49 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Svend L (Gerrit)

      unread,
      Aug 7, 2026, 3:45:32 PM (9 days ago) Aug 7
      to manuk hovanesian, Kyra Seevers, Tiffany Song, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, extension...@chromium.org, alexmo...@chromium.org, chrome-intelligence-te...@google.com, browser-comp...@chromium.org, ayman...@chromium.org, ios-r...@chromium.org, chrome-intell...@chromium.org, mdjone...@chromium.org, navigation...@chromium.org, creis...@chromium.org, yuezhang...@chromium.org, marq+...@chromium.org, chromium-a...@chromium.org, ios-revie...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
      Attention needed from manuk hovanesian

      Svend L added 6 comments

      Patchset-level comments
      File-level comment, Patchset 11 (Latest):
      Svend L . resolved

      Thanks for the review Manuk!

      File chrome/browser/history/history_tab_helper.cc
      Line 337, Patchset 10 (Parent): status_code_qualifies_for_ntp_most_visited &&
      manuk hovanesian . resolved

      before:
      feature was enabled,
      so status_code_qualifies_for_ntp_most_visited was false,
      so should_consider_for_ntp_most_visited was always false.

      shouldn't we remove lines 326-331 to preserve current launch behavior?

      Svend L

      Before, the condition was this (whitespace changed for extra legibility):

      ```cpp
      !(
      base::FeatureList::IsEnabled(history::kVisitedLinksOn404) &&
      http_response_code == 404
      )
      ```

      The feature is now always true, so the condition is now equivalent to:

      ```cpp
      !(
      http_response_code == 404
      )
      ```

      so I think the current inlining is correct.

      File components/history/core/browser/history_backend.cc
      Line 1258, Patchset 10: // visits were excluded to avoid making a feature change to `VisitTracker`

      // at the same time as the change to make 404s eligible for History (before
      // that change, 404 visits were skipped upstream of this code).
      manuk hovanesian . resolved

      optional nit, indent subsequent lines of todo comments

      ```
      // chains.
      // TODO...
      // visits were
      // at the same
      // that change
      // TODO
      // navigation
      // them
      ```

      Svend L

      Done

      File content/browser/renderer_host/render_frame_host_impl.cc
      Line 18469, Patchset 10: const bool browser_should_update_history = !browser_url_is_unreachable;
      manuk hovanesian . resolved

      can we dedupe these variables?

      Svend L

      We could, but this variable is used with a bunch of other variables that are the browser-calculated version of renderer-provided values. They're then all used together several times in blocks, like this one on L18494:

      ```c++
      const bool everything_except_origin_matches =
      ((!ShouldVerify("method") || browser_method == params.method) &&
      (!ShouldVerify("url_is_unreachable") ||
      browser_url_is_unreachable == params.url_is_unreachable) &&
      (!ShouldVerify("post_id") || browser_post_id == params.post_id) &&
      (!ShouldVerify("is_overriding_user_agent") ||
      browser_is_overriding_user_agent == params.is_overriding_user_agent) &&
      (!ShouldVerify("http_status_code") ||
      browser_http_status_code == params.http_status_code) &&
      (!ShouldVerify("should_update_history") ||
      browser_should_update_history == params.should_update_history) &&
      // ...
      ```

      Other `browser_`-prefixed variables could also be easily inlined but aren't, like this one:

      ```c++
      const bool browser_url_is_unreachable = is_error_document;
      ```

      I suspect they're preserved as variables for consistency and legibility during comparisons to the renderer-provided values. I think I should keep that pattern here.

      File content/renderer/render_frame_impl.cc
      Line 5212, Patchset 10: params->should_update_history = !document_loader->HasUnreachableURL();
      manuk hovanesian . resolved

      optional, likewise, should we dedupe these variables

      Svend L

      `should_update_history` is a member of `mojom::DidCommitProvisionalLoadParams`, so I don't think we can dedupe here.

      File ios/chrome/browser/history/model/history_tab_helper.mm
      Line 125, Patchset 10 (Parent): const bool status_code_qualifies_for_ntp_most_visited =
      manuk hovanesian . resolved

      this was false before, so shouldn't consider_for_ntp_most_visited also be false now to preserve launched behavior ?

      Svend L

      Same as the thread on `chrome/browser/history/history_tab_helper.cc`, the conditional with `base::FeatureList::IsEnabled(history::kVisitedLinksOn404)` now always `true` is equivalent to:

      ```cpp
      const bool status_code_qualifies_for_ntp_most_visited = !(http_response_code == 404);
      ```

      So I believe this is inlined correctly.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • manuk hovanesian
      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: I1fefd16e466519af7e3a52608bd991206a6a6964
        Gerrit-Change-Number: 8106124
        Gerrit-PatchSet: 11
        Gerrit-Owner: Svend L <sv...@chromium.org>
        Gerrit-Reviewer: Kyra Seevers <kyras...@chromium.org>
        Gerrit-Reviewer: Svend L <sv...@chromium.org>
        Gerrit-Reviewer: manuk hovanesian <man...@chromium.org>
        Gerrit-CC: Tiffany Song <tiffa...@google.com>
        Gerrit-Attention: manuk hovanesian <man...@chromium.org>
        Gerrit-Comment-Date: Fri, 07 Aug 2026 19:45:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: manuk hovanesian <man...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        manuk hovanesian (Gerrit)

        unread,
        Aug 14, 2026, 6:49:32 PM (2 days ago) Aug 14
        to Svend L, Kyra Seevers, Tiffany Song, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, extension...@chromium.org, alexmo...@chromium.org, chrome-intelligence-te...@google.com, browser-comp...@chromium.org, ayman...@chromium.org, ios-r...@chromium.org, chrome-intell...@chromium.org, mdjone...@chromium.org, navigation...@chromium.org, creis...@chromium.org, yuezhang...@chromium.org, marq+...@chromium.org, chromium-a...@chromium.org, ios-revie...@chromium.org, dewitt...@chromium.org, mfoltz+wa...@chromium.org
        Attention needed from Svend L

        manuk hovanesian voted and added 1 comment

        Votes added by manuk hovanesian

        Code-Review+1

        1 comment

        Patchset-level comments
        File-level comment, Patchset 13 (Latest):
        manuk hovanesian . resolved

        lgtm

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Svend L
        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: I1fefd16e466519af7e3a52608bd991206a6a6964
        Gerrit-Change-Number: 8106124
        Gerrit-PatchSet: 13
        Gerrit-Owner: Svend L <sv...@chromium.org>
        Gerrit-Reviewer: Kyra Seevers <kyras...@chromium.org>
        Gerrit-Reviewer: Svend L <sv...@chromium.org>
        Gerrit-Reviewer: manuk hovanesian <man...@chromium.org>
        Gerrit-CC: Tiffany Song <tiffa...@google.com>
        Gerrit-Attention: Svend L <sv...@chromium.org>
        Gerrit-Comment-Date: Fri, 14 Aug 2026 22:49:19 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages