[bedrock] Migrate GetBrowserCount Step 2 [chromium/src : main]

0 views
Skip to first unread message

Qikai Zhong (Gerrit)

unread,
Apr 20, 2026, 5:46:21 AM (11 days ago) Apr 20
to Kun Wang, Thomas Lukaszewicz, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Kun Wang and Thomas Lukaszewicz

Qikai Zhong voted and added 3 comments

Votes added by Qikai Zhong

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Qikai Zhong . resolved

LGTM, leave two nit comments

Commit Message
Line 7, Patchset 9 (Latest):[bedrock] Migrate GetBrowserCount Step 2
Qikai Zhong . unresolved

Maybe add some necessary detail.

File chrome/browser/profiles/avatar_menu_browsertest.cc
Line 111, Patchset 9 (Latest): EXPECT_EQ(chrome::GetBrowserCount(profile), 1U);
Qikai Zhong . unresolved

nit: missing one

Open in Gerrit

Related details

Attention is currently required from:
  • Kun Wang
  • 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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
Gerrit-Change-Number: 7760911
Gerrit-PatchSet: 9
Gerrit-Owner: Kun Wang <kun...@microsoft.com>
Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-CC: James Maclean <wjma...@chromium.org>
Gerrit-CC: Kevin McNee <mc...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-Attention: Kun Wang <kun...@microsoft.com>
Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-Comment-Date: Mon, 20 Apr 2026 09:45:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Lukaszewicz (Gerrit)

unread,
Apr 20, 2026, 2:45:53 PM (10 days ago) Apr 20
to Kun Wang, Qikai Zhong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Kun Wang

Thomas Lukaszewicz added 1 comment

File chrome/browser/ui/browser_window/internal/profile_browser_collection.cc
Line 49, Patchset 9 (Latest):size_t ProfileBrowserCollection::GetBrowserCount(Profile* profile) {
Thomas Lukaszewicz . unresolved

Is there any chance we could use the existing `BrowserCollection::GetSize()` method (it should work for profile-scoped and globally-scoped collections). You can use it in these profile-scoped contexts by calling
```
ProfileBrowserCollection::GetForProfile(profile)->GetSize()
```

`GetSize()` shouldn't include pending-delete browsers and I suspect the `IsBrowserShownForProfile` handling for ChromeOS may not be necessary (though perhaps we split the chromeos-specific changes out into their own separate CL to be sure).

Open in Gerrit

Related details

Attention is currently required from:
  • Kun Wang
Gerrit-Comment-Date: Mon, 20 Apr 2026 18:45:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Qikai Zhong (Gerrit)

unread,
Apr 20, 2026, 9:11:18 PM (10 days ago) Apr 20
to Kun Wang, Thomas Lukaszewicz, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Kun Wang

Qikai Zhong voted and added 1 comment

Votes added by Qikai Zhong

Code-Review+1

1 comment

File chrome/browser/ui/browser_window/internal/profile_browser_collection.cc
Line 49, Patchset 9:size_t ProfileBrowserCollection::GetBrowserCount(Profile* profile) {
Thomas Lukaszewicz . unresolved

Is there any chance we could use the existing `BrowserCollection::GetSize()` method (it should work for profile-scoped and globally-scoped collections). You can use it in these profile-scoped contexts by calling
```
ProfileBrowserCollection::GetForProfile(profile)->GetSize()
```

`GetSize()` shouldn't include pending-delete browsers and I suspect the `IsBrowserShownForProfile` handling for ChromeOS may not be necessary (though perhaps we split the chromeos-specific changes out into their own separate CL to be sure).

Qikai Zhong

+1. You may follow this CL to user `GetSize()`

Open in Gerrit

Related details

Attention is currently required from:
  • Kun Wang
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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
Gerrit-Change-Number: 7760911
Gerrit-PatchSet: 10
Gerrit-Owner: Kun Wang <kun...@microsoft.com>
Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-CC: James Maclean <wjma...@chromium.org>
Gerrit-CC: Kevin McNee <mc...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-Attention: Kun Wang <kun...@microsoft.com>
Gerrit-Comment-Date: Tue, 21 Apr 2026 01:10:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Thomas Lukaszewicz <tl...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Qikai Zhong (Gerrit)

unread,
Apr 20, 2026, 9:18:44 PM (10 days ago) Apr 20
to Kun Wang, Thomas Lukaszewicz, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Kun Wang

Qikai Zhong added 1 comment

File chrome/browser/ui/browser_window/internal/profile_browser_collection.cc
Line 49, Patchset 9:size_t ProfileBrowserCollection::GetBrowserCount(Profile* profile) {
Thomas Lukaszewicz . unresolved

Is there any chance we could use the existing `BrowserCollection::GetSize()` method (it should work for profile-scoped and globally-scoped collections). You can use it in these profile-scoped contexts by calling
```
ProfileBrowserCollection::GetForProfile(profile)->GetSize()
```

`GetSize()` shouldn't include pending-delete browsers and I suspect the `IsBrowserShownForProfile` handling for ChromeOS may not be necessary (though perhaps we split the chromeos-specific changes out into their own separate CL to be sure).

Qikai Zhong

+1. You may follow this CL to user `GetSize()`

Gerrit-Comment-Date: Tue, 21 Apr 2026 01:18:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Qikai Zhong <qikai...@microsoft.com>
Comment-In-Reply-To: Thomas Lukaszewicz <tl...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kun Wang (Gerrit)

unread,
Apr 22, 2026, 11:40:09 AM (8 days ago) Apr 22
to Qikai Zhong, Thomas Lukaszewicz, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
Attention needed from Qikai Zhong and Thomas Lukaszewicz

Kun Wang added 3 comments

Commit Message
Line 7, Patchset 9:[bedrock] Migrate GetBrowserCount Step 2
Qikai Zhong . resolved

Maybe add some necessary detail.

Kun Wang

Done

File chrome/browser/profiles/avatar_menu_browsertest.cc
Line 111, Patchset 9: EXPECT_EQ(chrome::GetBrowserCount(profile), 1U);
Qikai Zhong . resolved

nit: missing one

Kun Wang

Thanks, guess this is due to a bad rebase...

File chrome/browser/ui/browser_window/internal/profile_browser_collection.cc
Line 49, Patchset 9:size_t ProfileBrowserCollection::GetBrowserCount(Profile* profile) {
Thomas Lukaszewicz . resolved

Is there any chance we could use the existing `BrowserCollection::GetSize()` method (it should work for profile-scoped and globally-scoped collections). You can use it in these profile-scoped contexts by calling
```
ProfileBrowserCollection::GetForProfile(profile)->GetSize()
```

`GetSize()` shouldn't include pending-delete browsers and I suspect the `IsBrowserShownForProfile` handling for ChromeOS may not be necessary (though perhaps we split the chromeos-specific changes out into their own separate CL to be sure).

Kun Wang

`IsBrowserShownForProfile` was added here to fix:
https://luci-milo.appspot.com/ui/inv/build-8684453803395850961/test-results?q=BrowserFinderChromeOSTest.FindBrowserOwnedByAnotherProfile

I will see if ProfileBrowserCollection::GetForProfile(profile)->GetSize() works

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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
    Gerrit-Change-Number: 7760911
    Gerrit-PatchSet: 14
    Gerrit-Owner: Kun Wang <kun...@microsoft.com>
    Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
    Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-CC: Andrew Rayskiy <green...@google.com>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Kevin McNee <mc...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
    Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Apr 2026 15:39:32 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Thomas Lukaszewicz (Gerrit)

    unread,
    Apr 22, 2026, 5:20:16 PM (8 days ago) Apr 22
    to Kun Wang, Hidehiko Abe, Qikai Zhong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
    Attention needed from Hidehiko Abe, Kun Wang and Qikai Zhong

    Thomas Lukaszewicz voted and added 1 comment

    Votes added by Thomas Lukaszewicz

    Code-Review+1

    1 comment

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

    Hidehiko ptal for `chrome/browser/ash/DEPS`

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Hidehiko Abe
    • Kun Wang
    • Qikai Zhong
    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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
    Gerrit-Change-Number: 7760911
    Gerrit-PatchSet: 14
    Gerrit-Owner: Kun Wang <kun...@microsoft.com>
    Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
    Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
    Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
    Gerrit-CC: Andrew Rayskiy <green...@google.com>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Kevin McNee <mc...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Kun Wang <kun...@microsoft.com>
    Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
    Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
    Gerrit-Comment-Date: Wed, 22 Apr 2026 21:19:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Hidehiko Abe (Gerrit)

    unread,
    Apr 22, 2026, 6:12:52 PM (8 days ago) Apr 22
    to Kun Wang, Thomas Lukaszewicz, Qikai Zhong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
    Attention needed from Kun Wang and Qikai Zhong

    Hidehiko Abe added 3 comments

    File chrome/browser/ash/DEPS
    Line 20, Patchset 14 (Latest): "+chrome/browser/ui/browser_window/public/profile_browser_collection.h",
    Hidehiko Abe . unresolved

    could you avoid allowing c/b/ui deps to wider area under c/b/ash?
    Instead, could you update DEPS files in sub directories?

    File chrome/browser/profiles/profile_window_browsertest.cc
    Line 121, Patchset 14 (Latest): EXPECT_EQ(size_t{0}, 0u);
    Hidehiko Abe . unresolved

    This is 0 vs 0. Maybe just remove?

    File chrome/browser/ui/browser_window/internal/BUILD.gn
    Line 153, Patchset 14 (Latest): "//chrome/browser/ui/ash/multi_user",
    Hidehiko Abe . unresolved

    clarification: why we need this in this CL...?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kun Wang
    • Qikai Zhong
    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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
      Gerrit-Change-Number: 7760911
      Gerrit-PatchSet: 14
      Gerrit-Owner: Kun Wang <kun...@microsoft.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-CC: Andrew Rayskiy <green...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: James Maclean <wjma...@chromium.org>
      Gerrit-CC: Kevin McNee <mc...@chromium.org>
      Gerrit-CC: Simon Hangl <sim...@google.com>
      Gerrit-Attention: Kun Wang <kun...@microsoft.com>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Comment-Date: Wed, 22 Apr 2026 22:12:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Kun Wang (Gerrit)

      unread,
      Apr 23, 2026, 1:38:58 AM (8 days ago) Apr 23
      to Hidehiko Abe, Thomas Lukaszewicz, Qikai Zhong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
      Attention needed from Hidehiko Abe, Qikai Zhong and Thomas Lukaszewicz

      Kun Wang added 3 comments

      File chrome/browser/ash/DEPS
      Line 20, Patchset 14: "+chrome/browser/ui/browser_window/public/profile_browser_collection.h",
      Hidehiko Abe . resolved

      could you avoid allowing c/b/ui deps to wider area under c/b/ash?
      Instead, could you update DEPS files in sub directories?

      Kun Wang

      Sure, I will move it to sub directories and I understand that we should make this in the minimum sub dir. It should be in chrome/browser/ash/app_list and it has been added by another cl, the change has been rebase to this current cl, so removed it.

      File chrome/browser/profiles/profile_window_browsertest.cc
      Line 121, Patchset 14: EXPECT_EQ(size_t{0}, 0u);
      Hidehiko Abe . resolved

      This is 0 vs 0. Maybe just remove?

      Kun Wang

      Yes, you are right, the new implementation doesn't handle null-profile, so this check is not necessary any more, removed

      File chrome/browser/ui/browser_window/internal/BUILD.gn
      Line 153, Patchset 14: "//chrome/browser/ui/ash/multi_user",
      Hidehiko Abe . resolved

      clarification: why we need this in this CL...?

      Kun Wang

      Thanks for reminding this. This is due to patchset 2 when I tried to fix a chromeos unit test in a wrong way, which should be reverted.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • 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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
      Gerrit-Change-Number: 7760911
      Gerrit-PatchSet: 15
      Gerrit-Owner: Kun Wang <kun...@microsoft.com>
      Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
      Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-CC: Andrew Rayskiy <green...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: James Maclean <wjma...@chromium.org>
      Gerrit-CC: Kevin McNee <mc...@chromium.org>
      Gerrit-CC: Simon Hangl <sim...@google.com>
      Gerrit-Attention: Qikai Zhong <qikai...@microsoft.com>
      Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Thu, 23 Apr 2026 05:38:33 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Hidehiko Abe <hide...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Qikai Zhong (Gerrit)

      unread,
      Apr 23, 2026, 2:09:14 AM (8 days ago) Apr 23
      to Kun Wang, Hidehiko Abe, Thomas Lukaszewicz, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
      Attention needed from Hidehiko Abe, Kun Wang and Thomas Lukaszewicz

      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:
      • Hidehiko Abe
      • Kun Wang
      • Thomas Lukaszewicz
      Gerrit-Attention: Kun Wang <kun...@microsoft.com>
      Gerrit-Attention: Thomas Lukaszewicz <tl...@chromium.org>
      Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
      Gerrit-Comment-Date: Thu, 23 Apr 2026 06:08:37 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Thomas Lukaszewicz (Gerrit)

      unread,
      Apr 23, 2026, 3:32:41 PM (7 days ago) Apr 23
      to Kun Wang, Qikai Zhong, Hidehiko Abe, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
      Attention needed from Hidehiko Abe and Kun Wang

      Thomas Lukaszewicz voted and added 1 comment

      Votes added by Thomas Lukaszewicz

      Code-Review+1

      1 comment

      Patchset-level comments
      Thomas Lukaszewicz . resolved

      lgtm

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hidehiko Abe
      • Kun Wang
      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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
        Gerrit-Change-Number: 7760911
        Gerrit-PatchSet: 15
        Gerrit-Owner: Kun Wang <kun...@microsoft.com>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
        Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
        Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
        Gerrit-CC: Andrew Rayskiy <green...@google.com>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: James Maclean <wjma...@chromium.org>
        Gerrit-CC: Kevin McNee <mc...@chromium.org>
        Gerrit-CC: Simon Hangl <sim...@google.com>
        Gerrit-Attention: Kun Wang <kun...@microsoft.com>
        Gerrit-Attention: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Comment-Date: Thu, 23 Apr 2026 19:32:01 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Hidehiko Abe (Gerrit)

        unread,
        Apr 23, 2026, 4:28:06 PM (7 days ago) Apr 23
        to Kun Wang, Thomas Lukaszewicz, Qikai Zhong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
        Attention needed from Kun Wang

        Hidehiko Abe voted and added 1 comment

        Votes added by Hidehiko Abe

        Code-Review+1

        1 comment

        Patchset-level comments
        Hidehiko Abe . resolved

        LGTM

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Kun Wang
        Gerrit-Comment-Date: Thu, 23 Apr 2026 20:27:56 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Kun Wang (Gerrit)

        unread,
        Apr 23, 2026, 10:19:06 PM (7 days ago) Apr 23
        to Hidehiko Abe, Thomas Lukaszewicz, Qikai Zhong, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org

        Kun Wang voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention set is empty
        Gerrit-Comment-Date: Fri, 24 Apr 2026 02:18:37 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Apr 23, 2026, 10:33:56 PM (7 days ago) Apr 23
        to Kun Wang, Hidehiko Abe, Thomas Lukaszewicz, Qikai Zhong, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        [bedrock] Migrate GetBrowserCount Step 2

        Summary This change adds
        ProfileBrowserCollection::GetBrowserCount(Profile*) and migrates the
        next batch of chrome::GetBrowserCount() call sites to the browser-window
        collection API.

        The new helper counts only non-deleting browsers for a profile and
        preserves ChromeOS multi-user semantics by only counting browsers shown
        for that profile. This keeps profile-scoped browser counting consistent
        with the browser window model while updating affected browser tests,
        startup flows, and profile-related code.

        Testing Updated existing browser tests and unit tests in affected areas.
        Bug: 494010890
        Change-Id: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
        Reviewed-by: Thomas Lukaszewicz <tl...@chromium.org>
        Commit-Queue: Kun Wang <kun...@microsoft.com>
        Reviewed-by: Qikai Zhong <qikai...@microsoft.com>
        Reviewed-by: Hidehiko Abe <hide...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1619923}
        Files:
        • M chrome/browser/app_controller_mac.mm
        • M chrome/browser/apps/guest_view/web_view_browsertest.cc
        • M chrome/browser/ash/app_list/app_list_client_impl_browsertest.cc
        • M chrome/browser/browser_process_platform_part_ash_browsertest.cc
        • M chrome/browser/chrome_main_process_singleton_browsertest.cc
        • M chrome/browser/policy/login_policy_test_base_browsertest.cc
        • M chrome/browser/policy/test/restore_on_startup_policy_browsertest.cc
        • M chrome/browser/profiles/avatar_menu_browsertest.cc
        • M chrome/browser/profiles/delete_profile_helper.cc
        • M chrome/browser/profiles/profile_manager_browsertest.cc
        • M chrome/browser/profiles/profile_window_browsertest.cc
        • M chrome/browser/sessions/session_restore_browsertest.cc
        • M chrome/browser/signin/chrome_signin_and_sync_status_metrics_provider.cc
        • M chrome/browser/ssl/ssl_browsertest.cc
        • M chrome/browser/ui/ash/shelf/chrome_shelf_controller_browsertest.cc
        • M chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
        • M chrome/browser/ui/blocked_content/popup_tracker_browsertest.cc
        • M chrome/browser/ui/browser_browsertest.cc
        • M chrome/browser/ui/browser_finder_chromeos_browsertest.cc
        • M chrome/browser/ui/extensions/hosted_app_browsertest.cc
        • M chrome/browser/ui/startup/startup_browser_creator.cc
        • M chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
        • M chrome/browser/ui/startup/startup_browser_creator_interactive_uitest.cc
        • M chrome/browser/ui/views/frame/browser_window_property_manager_browsertest_win.cc
        • M chrome/browser/ui/views/profiles/profile_picker_view_browsertest.cc
        • M chrome/browser/ui/waap/initial_webui_browsertest.cc
        • M chrome/browser/ui/web_applications/launch_web_app_browsertest.cc
        • M chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.cc
        • M chrome/browser/ui/web_applications/web_app_browsertest.cc
        • M chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc
        • M chrome/browser/ui/web_applications/web_app_launch_prevent_close_browsertest.cc
        • M chrome/browser/web_applications/web_app_run_on_os_login_manager_browsertest.cc
        Change size: L
        Delta: 32 files changed, 430 insertions(+), 196 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Hidehiko Abe, +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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
        Gerrit-Change-Number: 7760911
        Gerrit-PatchSet: 16
        Gerrit-Owner: Kun Wang <kun...@microsoft.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
        Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
        Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
        Gerrit-CC: Andrew Rayskiy <green...@google.com>
        open
        diffy
        satisfied_requirement

        Dan H (Gerrit)

        unread,
        Apr 24, 2026, 6:22:52 PM (6 days ago) Apr 24
        to Chromium LUCI CQ, Kun Wang, Dan H, Hidehiko Abe, Thomas Lukaszewicz, Qikai Zhong, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org
        Attention needed from Kun Wang

        Dan H added 1 comment

        File chrome/browser/signin/chrome_signin_and_sync_status_metrics_provider.cc
        Line 43, Patchset 16 (Latest): if (ProfileBrowserCollection::GetForProfile(profile)->GetSize() == 0) {
        Dan H . unresolved

        this has been crashing on my local builds, GetForProfile() returns null sometimes.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Kun Wang
        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: I5cdc480f9933ab8a74fcbbbb6e3194ec04d478cb
        Gerrit-Change-Number: 7760911
        Gerrit-PatchSet: 16
        Gerrit-Owner: Kun Wang <kun...@microsoft.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Hidehiko Abe <hide...@chromium.org>
        Gerrit-Reviewer: Kun Wang <kun...@microsoft.com>
        Gerrit-Reviewer: Qikai Zhong <qikai...@microsoft.com>
        Gerrit-Reviewer: Thomas Lukaszewicz <tl...@chromium.org>
        Gerrit-CC: Andrew Rayskiy <green...@google.com>
        Gerrit-CC: Dan H <harri...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: James Maclean <wjma...@chromium.org>
        Gerrit-CC: Kevin McNee <mc...@chromium.org>
        Gerrit-CC: Simon Hangl <sim...@google.com>
        Gerrit-Attention: Kun Wang <kun...@microsoft.com>
        Gerrit-Comment-Date: Fri, 24 Apr 2026 22:22:44 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        open
        diffy

        Kun Wang (Gerrit)

        unread,
        Apr 27, 2026, 2:29:25 AM (4 days ago) Apr 27
        to Chromium LUCI CQ, Dan H, Hidehiko Abe, Thomas Lukaszewicz, Qikai Zhong, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org

        Kun Wang added 1 comment

        File chrome/browser/signin/chrome_signin_and_sync_status_metrics_provider.cc
        Line 43, Patchset 16 (Latest): if (ProfileBrowserCollection::GetForProfile(profile)->GetSize() == 0) {
        Dan H . resolved

        this has been crashing on my local builds, GetForProfile() returns null sometimes.

        Kun Wang

        Acknowledged. Thanks for your feedback, we have another CL to handle this issue. https://chromium-review.googlesource.com/c/chromium/src/+/7794693

        Open in Gerrit

        Related details

        Attention set is empty
        Gerrit-Comment-Date: Mon, 27 Apr 2026 06:28:48 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Dan H <harri...@chromium.org>
        satisfied_requirement
        open
        diffy

        Thomas Lukaszewicz (Gerrit)

        unread,
        Apr 27, 2026, 1:55:59 PM (3 days ago) Apr 27
        to Chromium LUCI CQ, Kun Wang, Dan H, Hidehiko Abe, Qikai Zhong, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Enterprise Policy Reviews, Andrew Rayskiy, Kevin McNee, Simon Hangl, James Maclean, aixba+wat...@chromium.org, chromium-a...@chromium.org, csharrison+...@chromium.org, dibyapal+wa...@chromium.org, dmurph+wat...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, japhet+...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mac-r...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, nicolas...@chromium.org, philli...@chromium.org, rginda...@chromium.org, webap...@microsoft.com, ydago...@chromium.org, zelin+watch-we...@chromium.org

        Thomas Lukaszewicz has created a revert of this change

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: revert
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages