[bedrock] Replace browser->window() under chrome/browser/ui/ (phase 2 part 2) [chromium/src : main]

0 views
Skip to first unread message

Neil Bao (Gerrit)

unread,
Jun 17, 2026, 11:01:16 AM (12 days ago) Jun 17
to Thomas Lukaszewicz, Qikai Zhong, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Qikai Zhong and Thomas Lukaszewicz

Neil Bao voted and added 1 comment

Votes added by Neil Bao

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Neil Bao . resolved

Please take a look, thx!

Open in Gerrit

Related details

Attention is currently required from:
  • Qikai Zhong
  • Thomas Lukaszewicz
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: I81c88d122030b87dd30f6bc62a9d71823e4efd75
Gerrit-Change-Number: 7957877
Gerrit-PatchSet: 1
Gerrit-Owner: Neil Bao <nei...@microsoft.com>
Gerrit-Reviewer: Neil Bao <nei...@microsoft.com>
Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Comment-Date: Wed, 17 Jun 2026 15:00:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Lukaszewicz (Gerrit)

unread,
Jun 17, 2026, 6:55:41 PM (12 days ago) Jun 17
to Neil Bao, Qikai Zhong, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Neil Bao and Qikai Zhong

Thomas Lukaszewicz voted and added 1 comment

Votes added by Thomas Lukaszewicz

Code-Review+1

1 comment

Patchset-level comments
Thomas Lukaszewicz . resolved

nice! lgtm

Open in Gerrit

Related details

Attention is currently required from:
  • Neil Bao
  • Qikai Zhong
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I81c88d122030b87dd30f6bc62a9d71823e4efd75
Gerrit-Change-Number: 7957877
Gerrit-PatchSet: 1
Gerrit-Owner: Neil Bao <nei...@microsoft.com>
Gerrit-Reviewer: Neil Bao <nei...@microsoft.com>
Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Attention: Neil Bao <nei...@microsoft.com>
Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Comment-Date: Wed, 17 Jun 2026 22:55:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Qikai Zhong (Gerrit)

unread,
Jun 17, 2026, 10:13:25 PM (11 days ago) Jun 17
to Neil Bao, Thomas Lukaszewicz, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Neil Bao

Qikai Zhong voted and added 1 comment

Votes added by Qikai Zhong

Code-Review+1

1 comment

Patchset-level comments
Qikai Zhong . resolved

lgtm

Open in Gerrit

Related details

Attention is currently required from:
  • Neil Bao
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: I81c88d122030b87dd30f6bc62a9d71823e4efd75
    Gerrit-Change-Number: 7957877
    Gerrit-PatchSet: 1
    Gerrit-Owner: Neil Bao <nei...@microsoft.com>
    Gerrit-Reviewer: Neil Bao <nei...@microsoft.com>
    Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-Attention: Neil Bao <nei...@microsoft.com>
    Gerrit-Comment-Date: Thu, 18 Jun 2026 02:12:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Neil Bao (Gerrit)

    unread,
    Jun 17, 2026, 10:54:25 PM (11 days ago) Jun 17
    to Qikai Zhong, Thomas Lukaszewicz, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Qikai Zhong and Thomas Lukaszewicz

    Neil Bao voted and added 1 comment

    Votes added by Neil Bao

    Auto-Submit+1
    Commit-Queue+2

    1 comment

    Patchset-level comments
    File-level comment, Patchset 2 (Latest):
    Neil Bao . resolved

    rebased for conflict

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Qikai Zhong
    • Thomas Lukaszewicz
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I81c88d122030b87dd30f6bc62a9d71823e4efd75
      Gerrit-Change-Number: 7957877
      Gerrit-PatchSet: 2
      Gerrit-Owner: Neil Bao <nei...@microsoft.com>
      Gerrit-Reviewer: Neil Bao <nei...@microsoft.com>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Comment-Date: Thu, 18 Jun 2026 02:53:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Thomas Lukaszewicz (Gerrit)

      unread,
      Jun 17, 2026, 11:44:44 PM (11 days ago) Jun 17
      to Neil Bao, Qikai Zhong, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Neil Bao and Qikai Zhong

      Thomas Lukaszewicz voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Neil Bao
      • Qikai Zhong
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I81c88d122030b87dd30f6bc62a9d71823e4efd75
      Gerrit-Change-Number: 7957877
      Gerrit-PatchSet: 2
      Gerrit-Owner: Neil Bao <nei...@microsoft.com>
      Gerrit-Reviewer: Neil Bao <nei...@microsoft.com>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Attention: Neil Bao <nei...@microsoft.com>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Comment-Date: Thu, 18 Jun 2026 03:44:13 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Qikai Zhong (Gerrit)

      unread,
      Jun 18, 2026, 2:01:19 AM (11 days ago) Jun 18
      to Neil Bao, Thomas Lukaszewicz, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Neil Bao

      Qikai Zhong voted and added 1 comment

      Votes added by Qikai Zhong

      Code-Review+1
      Commit-Queue+2

      1 comment

      Patchset-level comments
      Qikai Zhong . resolved

      lgtm

      Related details

      Attention is currently required from:
      • Neil Bao
      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: I81c88d122030b87dd30f6bc62a9d71823e4efd75
        Gerrit-Change-Number: 7957877
        Gerrit-PatchSet: 2
        Gerrit-Owner: Neil Bao <nei...@microsoft.com>
        Gerrit-Reviewer: Neil Bao <nei...@microsoft.com>
        Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
        Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
        Gerrit-Attention: Neil Bao <nei...@microsoft.com>
        Gerrit-Comment-Date: Thu, 18 Jun 2026 06:00:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jun 18, 2026, 2:14:19 AM (11 days ago) Jun 18
        to Neil Bao, Qikai Zhong, Thomas Lukaszewicz, chromium...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        [bedrock] Replace browser->window() under chrome/browser/ui/ (phase 2 part 2)

        This is part of the effort to eliminate Browser::window() (crbug.com/496674143).

        Replaces `browser->window()` (and the
        `browser->GetBrowserForMigrationOnly()->window()` chain) with
        `BrowserWindow::FromBrowser(browser)` for the top-level files under
        chrome/browser/ui/. Where the concrete subclass is needed, calls
        BrowserView::GetBrowserViewForBrowser() directly instead.

        Production code:
        - browser_command_controller.cc
        - browser_commands.cc (17 call sites)
        - browser_live_tab_context.cc
        - browser_tab_strip_model_delegate.cc
        - browser_tabrestore.cc
        - chrome_pages.cc
        - intent_picker_tab_helper.cc

        Browser tests:
        - browser_browsertest.cc (AsBrowserView() ->
        BrowserView::GetBrowserViewForBrowser())
        - browser_focus_interactive_uitest.cc
        - update_chrome_dialog_browsertest.cc

        browser_unittest.cc is intentionally left unchanged: its remaining
        window() calls static_cast to a test-only BrowserWindow subclass
        (BookmarkBarStateTestBrowserWindow) and are not straightforward to
        migrate.

        No behavior change.
        Bug: 496674143
        Change-Id: I81c88d122030b87dd30f6bc62a9d71823e4efd75
        Reviewed-by: Qikai Zhong <qikai...@microsoft.com>
        Reviewed-by: Thomas Lukaszewicz <tl...@chromium.org>
        Commit-Queue: Qikai Zhong <qikai...@microsoft.com>
        Auto-Submit: Neil Bao <nei...@microsoft.com>
        Cr-Commit-Position: refs/heads/main@{#1648816}
        Files:
        • M chrome/browser/ui/browser_browsertest.cc
        • M chrome/browser/ui/browser_command_controller.cc
        • M chrome/browser/ui/browser_commands.cc
        • M chrome/browser/ui/browser_focus_interactive_uitest.cc
        • M chrome/browser/ui/browser_live_tab_context.cc
        • M chrome/browser/ui/browser_tab_strip_model_delegate.cc
        • M chrome/browser/ui/browser_tabrestore.cc
        • M chrome/browser/ui/chrome_pages.cc
        • M chrome/browser/ui/intent_picker_tab_helper.cc
        • M chrome/browser/ui/update_chrome_dialog_browsertest.cc
        Change size: M
        Delta: 10 files changed, 44 insertions(+), 50 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Thomas Lukaszewicz, +1 by Qikai Zhong
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I81c88d122030b87dd30f6bc62a9d71823e4efd75
        Gerrit-Change-Number: 7957877
        Gerrit-PatchSet: 3
        Gerrit-Owner: Neil Bao <nei...@microsoft.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Neil Bao <nei...@microsoft.com>
        Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
        Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages