[bedrock] Move CloseAllBrowsersWithProfile(Profile*) to application_lifetime_desktop [chromium/src : main]

1 view
Skip to first unread message

Yu He (Gerrit)

unread,
May 14, 2026, 10:22:02 PMMay 14
to Thomas Lukaszewicz, android-bu...@system.gserviceaccount.com, Qikai Zhong, Kun Wang, Kevin DiClemente, Chromium LUCI CQ, chromium...@chromium.org, extension...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, ydago...@chromium.org, devtools...@chromium.org, dullweb...@chromium.org, nicolas...@chromium.org, msrame...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, csharrison+...@chromium.org, rginda...@chromium.org
Attention needed from Qikai Zhong and Thomas Lukaszewicz

Yu He voted and added 1 comment

Votes added by Yu He

Auto-Submit+1
Commit-Queue+1

1 comment

File chrome/browser/ui/browser_window/public/browser_collection.h
Line 90, Patchset 14: void CloseAllBrowsers();
Thomas Lukaszewicz . unresolved

Let's move this to application_lifetime also and keep the profile param. Sorry for the code churn but it'll be helpful to have all lifetime-related APIs in the same location.

Yu He

agree

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 satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iba56370e67ee3d6114103a983e94efe5924b0ecd
Gerrit-Change-Number: 7828527
Gerrit-PatchSet: 16
Gerrit-Owner: Yu He <y...@microsoft.com>
Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Reviewer: Yu He <y...@microsoft.com>
Gerrit-CC: Kevin DiClemente <ked...@microsoft.com>
Gerrit-CC: Kun Wang <kun...@microsoft.com>
Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Comment-Date: Fri, 15 May 2026 02:21:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Thomas Lukaszewicz <tl...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Lukaszewicz (Gerrit)

unread,
May 14, 2026, 10:23:05 PMMay 14
to Yu He, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Qikai Zhong, Kun Wang, Kevin DiClemente, Chromium LUCI CQ, chromium...@chromium.org, extension...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, ydago...@chromium.org, devtools...@chromium.org, dullweb...@chromium.org, nicolas...@chromium.org, msrame...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, csharrison+...@chromium.org, rginda...@chromium.org
Attention needed from Hidehiko Abe, Qikai Zhong and Yu He

Thomas Lukaszewicz voted and added 1 comment

Votes added by Thomas Lukaszewicz

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 16 (Latest):
Thomas Lukaszewicz . resolved

lgtm!

Open in Gerrit

Related details

Attention is currently required from:
  • Hidehiko Abe
  • Qikai Zhong
  • Yu He
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: Iba56370e67ee3d6114103a983e94efe5924b0ecd
    Gerrit-Change-Number: 7828527
    Gerrit-PatchSet: 16
    Gerrit-Owner: Yu He <y...@microsoft.com>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-Reviewer: Yu He <y...@microsoft.com>
    Gerrit-CC: Kevin DiClemente <ked...@microsoft.com>
    Gerrit-CC: Kun Wang <kun...@microsoft.com>
    Gerrit-Attention: Yu He <y...@microsoft.com>
    Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
    Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Comment-Date: Fri, 15 May 2026 02:22:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yu He (Gerrit)

    unread,
    May 14, 2026, 10:23:16 PMMay 14
    to Thomas Lukaszewicz, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Qikai Zhong, Kun Wang, Kevin DiClemente, Chromium LUCI CQ, chromium...@chromium.org, extension...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, ydago...@chromium.org, devtools...@chromium.org, dullweb...@chromium.org, nicolas...@chromium.org, msrame...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, csharrison+...@chromium.org, rginda...@chromium.org
    Attention needed from Hidehiko Abe, Qikai Zhong and Yu He

    Yu He added 1 comment

    File chrome/browser/ui/browser_window/public/browser_collection.h
    Line 90, Patchset 14: void CloseAllBrowsers();
    Thomas Lukaszewicz . resolved

    Let's move this to application_lifetime also and keep the profile param. Sorry for the code churn but it'll be helpful to have all lifetime-related APIs in the same location.

    Yu He

    agree

    Related details

    Attention is currently required from:
    • Hidehiko Abe
    • Qikai Zhong
    • Yu He
    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: Iba56370e67ee3d6114103a983e94efe5924b0ecd
      Gerrit-Change-Number: 7828527
      Gerrit-PatchSet: 16
      Gerrit-Owner: Yu He <y...@microsoft.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Reviewer: Yu He <y...@microsoft.com>
      Gerrit-CC: Kevin DiClemente <ked...@microsoft.com>
      Gerrit-CC: Kun Wang <kun...@microsoft.com>
      Gerrit-Attention: Yu He <y...@microsoft.com>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Fri, 15 May 2026 02:22:49 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Yu He <y...@microsoft.com>
      Comment-In-Reply-To: Thomas Lukaszewicz <tl...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Yu He (Gerrit)

      unread,
      May 14, 2026, 10:23:31 PMMay 14
      to Thomas Lukaszewicz, Hidehiko Abe, android-bu...@system.gserviceaccount.com, Qikai Zhong, Kun Wang, Kevin DiClemente, Chromium LUCI CQ, chromium...@chromium.org, extension...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, ydago...@chromium.org, devtools...@chromium.org, dullweb...@chromium.org, nicolas...@chromium.org, msrame...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, csharrison+...@chromium.org, rginda...@chromium.org
      Attention needed from Hidehiko Abe and Qikai Zhong

      Yu He voted Auto-Submit+0

      Auto-Submit+0
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Qikai Zhong
      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: Iba56370e67ee3d6114103a983e94efe5924b0ecd
      Gerrit-Change-Number: 7828527
      Gerrit-PatchSet: 16
      Gerrit-Owner: Yu He <y...@microsoft.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Reviewer: Yu He <y...@microsoft.com>
      Gerrit-CC: Kevin DiClemente <ked...@microsoft.com>
      Gerrit-CC: Kun Wang <kun...@microsoft.com>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Fri, 15 May 2026 02:23:08 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Hidehiko Abe (Gerrit)

      unread,
      May 15, 2026, 9:13:41 AMMay 15
      to Yu He, Thomas Lukaszewicz, android-bu...@system.gserviceaccount.com, Qikai Zhong, Kun Wang, Kevin DiClemente, Chromium LUCI CQ, chromium...@chromium.org, extension...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, ydago...@chromium.org, devtools...@chromium.org, dullweb...@chromium.org, nicolas...@chromium.org, msrame...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, csharrison+...@chromium.org, rginda...@chromium.org
      Attention needed from Qikai Zhong and Yu He

      Hidehiko Abe voted and added 1 comment

      Votes added by Hidehiko Abe

      Code-Review+1

      1 comment

      Patchset-level comments
      Hidehiko Abe . resolved

      LGTM for c/b/{ash,chromeos}.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Qikai Zhong
      • Yu He
      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: Iba56370e67ee3d6114103a983e94efe5924b0ecd
      Gerrit-Change-Number: 7828527
      Gerrit-PatchSet: 16
      Gerrit-Owner: Yu He <y...@microsoft.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Reviewer: Yu He <y...@microsoft.com>
      Gerrit-CC: Kevin DiClemente <ked...@microsoft.com>
      Gerrit-CC: Kun Wang <kun...@microsoft.com>
      Gerrit-Attention: Yu He <y...@microsoft.com>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Comment-Date: Fri, 15 May 2026 13:13:34 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Yu He (Gerrit)

      unread,
      May 17, 2026, 9:50:13 PM (12 days ago) May 17
      to Hidehiko Abe, Thomas Lukaszewicz, android-bu...@system.gserviceaccount.com, Qikai Zhong, Kun Wang, Kevin DiClemente, Chromium LUCI CQ, chromium...@chromium.org, extension...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, ydago...@chromium.org, devtools...@chromium.org, dullweb...@chromium.org, nicolas...@chromium.org, msrame...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, csharrison+...@chromium.org, rginda...@chromium.org
      Attention needed from Qikai Zhong

      Yu He voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Qikai Zhong
      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: Iba56370e67ee3d6114103a983e94efe5924b0ecd
      Gerrit-Change-Number: 7828527
      Gerrit-PatchSet: 16
      Gerrit-Owner: Yu He <y...@microsoft.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Reviewer: Yu He <y...@microsoft.com>
      Gerrit-CC: Kevin DiClemente <ked...@microsoft.com>
      Gerrit-CC: Kun Wang <kun...@microsoft.com>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Comment-Date: Mon, 18 May 2026 01:49:38 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      May 17, 2026, 10:43:45 PM (12 days ago) May 17
      to Yu He, Hidehiko Abe, Thomas Lukaszewicz, android-bu...@system.gserviceaccount.com, Qikai Zhong, Kun Wang, Kevin DiClemente, chromium...@chromium.org, extension...@chromium.org, oshima...@chromium.org, chromium-a...@chromium.org, ydago...@chromium.org, devtools...@chromium.org, dullweb...@chromium.org, nicolas...@chromium.org, msrame...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, csharrison+...@chromium.org, rginda...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      [bedrock] Move CloseAllBrowsersWithProfile(Profile*) to application_lifetime_desktop

      Per review feedback, relocates the single-argument helper
      chrome::CloseAllBrowsersWithProfile(Profile* profile)
      from chrome/browser/ui/browser_finder.{h,cc} to
      chrome/browser/lifetime/application_lifetime_desktop.{h,cc} so that all
      desktop browser-lifetime APIs live in one place. The helper is now
      co-located with its four-argument overload
      CloseAllBrowsersWithProfile(profile, skip_beforeunload,
      on_close_success, on_close_aborted)
      the off-the-record variant CloseAllBrowsersWithIncognitoProfile(), and
      related entry points such as CloseAllBrowsersAndQuit() and
      AttemptRestartWithMode().

      The function body is moved verbatim: it still looks up the per-profile
      BrowserCollection via ProfileBrowserCollection::GetForProfile(profile),
      no-ops when the collection has not been created, and asks every browser
      whose original profile matches `profile` to close. The close is
      asynchronous and does not run beforeunload handlers or trigger
      session-service shutdown; callers that need those semantics should use
      the four-argument overload, whose location and behavior are unchanged.

      Caller includes are updated from "chrome/browser/ui/browser_finder.h" to
      "chrome/browser/lifetime/application_lifetime_desktop.h":
      - chrome/browser/profiles/avatar_menu_browsertest.cc
      - chrome/browser/profiles/profile_browsertest.cc
      - chrome/browser/ui/blocked_content/popup_tracker_browsertest.cc
      - chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc

      No behavior change.
      Bug: 494010890
      Change-Id: Iba56370e67ee3d6114103a983e94efe5924b0ecd
      Reviewed-by: Thomas Lukaszewicz <tl...@chromium.org>
      Reviewed-by: Hidehiko Abe <hide...@chromium.org>
      Commit-Queue: Yu He <y...@microsoft.com>
      Cr-Commit-Position: refs/heads/main@{#1631943}
      Files:
      • M chrome/browser/ash/profiles/BUILD.gn
      • M chrome/browser/ash/profiles/DEPS
      • M chrome/browser/ash/profiles/signin_profile_handler.cc
      • M chrome/browser/autocomplete/BUILD.gn
      • M chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
      • M chrome/browser/chromeos/extensions/login_screen/login/cleanup/BUILD.gn
      • M chrome/browser/chromeos/extensions/login_screen/login/cleanup/DEPS
      • M chrome/browser/chromeos/extensions/login_screen/login/cleanup/browser_cleanup_handler.cc
      • M chrome/browser/chromeos/extensions/login_screen/login/cleanup/browser_cleanup_handler_browsertest.cc
      • M chrome/browser/devtools/devtools_browser_context_manager.cc
      • M chrome/browser/enterprise/BUILD.gn
      • M chrome/browser/enterprise/idle/action.cc
      • M chrome/browser/lifetime/application_lifetime_desktop.cc
      • M chrome/browser/lifetime/application_lifetime_desktop.h
      • M chrome/browser/profiles/avatar_menu_browsertest.cc
      • M chrome/browser/profiles/delete_profile_helper.cc
      • M chrome/browser/profiles/profile_browsertest.cc
      • M chrome/browser/profiles/profile_window.cc
      • M chrome/browser/sessions/session_restore_browsertest.cc
      • M chrome/browser/signin/chrome_signin_client.cc
      • M chrome/browser/supervised_user/BUILD.gn
      • M chrome/browser/supervised_user/desktop/supervised_user_service_platform_delegate.cc
      • M chrome/browser/ui/blocked_content/popup_tracker_browsertest.cc
      • M chrome/browser/ui/browser_command_controller.cc
      • M chrome/browser/ui/browser_finder.cc
      • M chrome/browser/ui/browser_finder.h
      • M chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc
      • M chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
      • M chrome/browser/ui/views/profiles/incognito_menu_view.cc
      • M chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc
      • M chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
      • M chrome/browser/ui/webui/signin/BUILD.gn
      • M chrome/browser/ui/webui/signin/profile_customization_handler.cc
      • M chrome/browser/unload_browsertest.cc
      Change size: L
      Delta: 34 files changed, 218 insertions(+), 191 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Hidehiko Abe, +1 by Thomas Lukaszewicz
      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: Iba56370e67ee3d6114103a983e94efe5924b0ecd
      Gerrit-Change-Number: 7828527
      Gerrit-PatchSet: 17
      Gerrit-Owner: Yu He <y...@microsoft.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Reviewer: Yu He <y...@microsoft.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages