[DebugUITabStrip] Add SessionRestore metadata to tab-strip-internals [chromium/src : main]

0 views
Skip to first unread message

Brijesh Giri (Gerrit)

unread,
Oct 26, 2025, 9:35:56 AM10/26/25
to Darryl James, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Darryl James

Brijesh Giri added 2 comments

File chrome/browser/sessions/session_restore.cc
Line 1522, Patchset 1:void SessionRestore::OnGotSession(
Brijesh Giri . unresolved

Does this method represent a `Primitive Obsession` code-smell?

Would it make sense to group related session restore properties together in a struct (data-class)?

File chrome/browser/sessions/session_restore_observer.h
Line 42, Patchset 1: virtual void OnGotSession(
Brijesh Giri . unresolved

Question: Does adding a new overload here break Interface Segregation Principle?

Or does providing a default no-op implementation make it exempt from the anti-pattern?

Open in Gerrit

Related details

Attention is currently required from:
  • Darryl James
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
Gerrit-Change-Number: 7063490
Gerrit-PatchSet: 3
Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Darryl James <dlj...@chromium.org>
Gerrit-Comment-Date: Sun, 26 Oct 2025 13:35:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Brijesh Giri (Gerrit)

unread,
Oct 26, 2025, 10:06:59 AM10/26/25
to Darryl James, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Darryl James

Brijesh Giri added 1 comment

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
Line 18, Patchset 3: SessionRestoreData restored_session;
Brijesh Giri . unresolved

@dlj...@chromium.org

I was able to hook into both `SessionService` (to read session data from disk without invalidating it) and `SessionRestoreObserver` (to observe callbacks when a session is restored). I added fields for both data sources to test how they behave in different scenarios.

From my testing, retrieving data through the observer is more ephemeral i.e. our debug page must already be open when the restore action occurs for it to receive those callbacks. In other words, you need to open the debug page first and then trigger the restore; refreshing the page creates new instances that no longer have access to the previously received callback data, resulting in an empty `restored_session`.

In contrast, the `saved_session` data obtained through SessionService remains valid across refreshes and after restore operations. During testing, I observed that the session data persisted on disk and was not immediately invalidated by a restore. Only closing the browser caused the on-disk session state to be replaced with new data.

Open in Gerrit

Related details

Attention is currently required from:
  • Darryl James
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
Gerrit-Change-Number: 7063490
Gerrit-PatchSet: 5
Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Darryl James <dlj...@chromium.org>
Gerrit-Comment-Date: Sun, 26 Oct 2025 14:06:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Brijesh Giri (Gerrit)

unread,
Oct 27, 2025, 2:32:02 PM10/27/25
to Atharv Maan, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Atharv Maan and Darryl James

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Atharv Maan
  • Darryl James
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
Gerrit-Change-Number: 7063490
Gerrit-PatchSet: 5
Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Atharv Maan <athar...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Oct 2025 18:31:56 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Darryl James (Gerrit)

unread,
Oct 31, 2025, 2:33:38 PM10/31/25
to Brijesh Giri, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Atharv Maan and Brijesh Giri

Darryl James added 4 comments

File chrome/browser/sessions/session_restore.h
Line 128, Patchset 5 (Latest): int window_count,
Darryl James . unresolved

This one can be removed since we can get the number of windows from `windows`

File chrome/browser/sessions/session_restore.cc
Line 1522, Patchset 1:void SessionRestore::OnGotSession(
Brijesh Giri . unresolved

Does this method represent a `Primitive Obsession` code-smell?

Would it make sense to group related session restore properties together in a struct (data-class)?

Darryl James

You can definitely group the properties in a struct, however in this case there are few enough parameters where it won't give us too much value (especially when window count gets removed).

File chrome/browser/sessions/session_restore_observer.h
Line 42, Patchset 1: virtual void OnGotSession(
Brijesh Giri . unresolved

Question: Does adding a new overload here break Interface Segregation Principle?

Or does providing a default no-op implementation make it exempt from the anti-pattern?

Darryl James

I would update the existing one and remove this overload. `window_count` can be inferred from `windows`. This also allows the callers to be funnelled into one function making it easier to debug (you only have to worry about 1 implementation).

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
Line 18, Patchset 3: SessionRestoreData restored_session;
Brijesh Giri . resolved

@dlj...@chromium.org

I was able to hook into both `SessionService` (to read session data from disk without invalidating it) and `SessionRestoreObserver` (to observe callbacks when a session is restored). I added fields for both data sources to test how they behave in different scenarios.

From my testing, retrieving data through the observer is more ephemeral i.e. our debug page must already be open when the restore action occurs for it to receive those callbacks. In other words, you need to open the debug page first and then trigger the restore; refreshing the page creates new instances that no longer have access to the previously received callback data, resulting in an empty `restored_session`.

In contrast, the `saved_session` data obtained through SessionService remains valid across refreshes and after restore operations. During testing, I observed that the session data persisted on disk and was not immediately invalidated by a restore. Only closing the browser caused the on-disk session state to be replaced with new data.

Darryl James

That is surprising to me! Let's keep this behavior for now 👍

Open in Gerrit

Related details

Attention is currently required from:
  • Atharv Maan
  • Brijesh Giri
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
Gerrit-Change-Number: 7063490
Gerrit-PatchSet: 5
Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
Gerrit-Attention: Atharv Maan <athar...@chromium.org>
Gerrit-Comment-Date: Fri, 31 Oct 2025 18:33:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Brijesh Giri <brijes...@gmail.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Brijesh Giri (Gerrit)

unread,
Nov 25, 2025, 12:21:25 AM11/25/25
to Atharv Maan, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Darryl James

Brijesh Giri added 5 comments

File chrome/browser/ash/app_restore/full_restore_app_launch_handler.cc
Line 202, Patchset 6 (Latest): const std::vector<const sessions::SessionWindow*>& windows) {
Brijesh Giri . unresolved

@dlj...@chromium.org

Could this potentially be a dangling reference issue if the caller of this observer method is destroyed while the observer is acting on the callback?

For context, these observer methods are invoked by `SessionRestore` which owns the actual `SessionWindow` objects. The observers only receive a vector of raw pointers to the `SessionWindow` objects.

File chrome/browser/sessions/session_restore.h
Line 128, Patchset 5: int window_count,
Darryl James . resolved

This one can be removed since we can get the number of windows from `windows`

Brijesh Giri

Done

File chrome/browser/sessions/session_restore.cc
Line 1522, Patchset 1:void SessionRestore::OnGotSession(
Brijesh Giri . resolved

Does this method represent a `Primitive Obsession` code-smell?

Would it make sense to group related session restore properties together in a struct (data-class)?

Darryl James

You can definitely group the properties in a struct, however in this case there are few enough parameters where it won't give us too much value (especially when window count gets removed).

Brijesh Giri

Done

File chrome/browser/sessions/session_restore_observer.h
Line 42, Patchset 1: virtual void OnGotSession(
Brijesh Giri . resolved

Question: Does adding a new overload here break Interface Segregation Principle?

Or does providing a default no-op implementation make it exempt from the anti-pattern?

Darryl James

I would update the existing one and remove this overload. `window_count` can be inferred from `windows`. This also allows the callers to be funnelled into one function making it easier to debug (you only have to worry about 1 implementation).

Brijesh Giri

Done

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer.cc
Line 186, Patchset 6 (Latest): last_session_windows_.push_back(DeepCopySessionWindow(window));
Brijesh Giri . unresolved

@dlj...@chromium.org

Deep copying as a precaution in-case the caller of this observer method gets destroyed before this callback is fully processed.

`SessionRestore` passes a vector of raw pointers to `SessionWindow` objects to the observers, which could potentially be destroyed before the TabStripInternalsObserver is completed with its callback flow.

Open in Gerrit

Related details

Attention is currently required from:
  • Darryl James
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
Gerrit-Change-Number: 7063490
Gerrit-PatchSet: 6
Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Darryl James <dlj...@chromium.org>
Gerrit-Comment-Date: Tue, 25 Nov 2025 05:21:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Brijesh Giri <brijes...@gmail.com>
Comment-In-Reply-To: Darryl James <dlj...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Darryl James (Gerrit)

unread,
Nov 25, 2025, 1:09:41 PM11/25/25
to Brijesh Giri, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Brijesh Giri

Darryl James added 4 comments

File chrome/browser/ash/app_restore/full_restore_app_launch_handler.cc
Line 202, Patchset 6: const std::vector<const sessions::SessionWindow*>& windows) {
Brijesh Giri . resolved

@dlj...@chromium.org

Could this potentially be a dangling reference issue if the caller of this observer method is destroyed while the observer is acting on the callback?

For context, these observer methods are invoked by `SessionRestore` which owns the actual `SessionWindow` objects. The observers only receive a vector of raw pointers to the `SessionWindow` objects.

Darryl James

Were you seeing this happen by any chance?

I think in the general sense that would be possible but if we look at when the observers are notified [starting from here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/sessions/session_restore.cc;drc=b32663066c4707a90f117b579f1993c7b74a0ad1;l=284) we can see that in the callback we are passing a weak ptr which helps us with the lifetime management if session restore is destroyed.

Going into OnGotSession, we can see that at that point in time we have the windows vector and that the observers are immediately notified of the session we have retrieved. From that perspective, we should not encounter any dangling pointer issues. I guess someone could remove / delete one of the session windows before handing the vector to callers but that would be a separate issue entirely!

So overall, I don't think we have a dangling pointer here. Do let me know if that is not the case!

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
Line 232, Patchset 7 (Latest):// `components/sessions/core/session_types.h.h`
Darryl James . unresolved

super nit: remove the additional `.h` 👍

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_handler.cc
Line 38, Patchset 7 (Latest): pending_callback_ = std::move(callback);
Darryl James . unresolved

Should we check if there are an already pending_callback_ before doing anything else? Maybe early return?

My worry is that this could get called multiple times and we end up overwriting the data and the wrong callback ends up getting called.

My preference would be to early return if there is an early callback. But depending on how we want to handle things, it would also be okay to store a list of pending callbacks that we process asynchronously / as they are called. But that might be more than we need in this case.

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer.cc
Line 186, Patchset 6: last_session_windows_.push_back(DeepCopySessionWindow(window));
Brijesh Giri . unresolved

@dlj...@chromium.org

Deep copying as a precaution in-case the caller of this observer method gets destroyed before this callback is fully processed.

`SessionRestore` passes a vector of raw pointers to `SessionWindow` objects to the observers, which could potentially be destroyed before the TabStripInternalsObserver is completed with its callback flow.

Darryl James

Let's add a brief comment to why we are deep copying here for future reference 👍

Open in Gerrit

Related details

Attention is currently required from:
  • Brijesh Giri
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
Gerrit-Change-Number: 7063490
Gerrit-PatchSet: 7
Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 18:09:30 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Brijesh Giri (Gerrit)

unread,
Nov 26, 2025, 4:35:24 PM11/26/25
to Atharv Maan, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Darryl James

Brijesh Giri added 1 comment

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_handler.cc
Line 38, Patchset 7: pending_callback_ = std::move(callback);
Darryl James . unresolved

Should we check if there are an already pending_callback_ before doing anything else? Maybe early return?

My worry is that this could get called multiple times and we end up overwriting the data and the wrong callback ends up getting called.

My preference would be to early return if there is an early callback. But depending on how we want to handle things, it would also be okay to store a list of pending callbacks that we process asynchronously / as they are called. But that might be more than we need in this case.

Brijesh Giri

Good idea. I admit that in-case of multiple calls, we would respond to the latest (incorrect) callback.

I have a chain of thought that I need to validate with you, apologies in advance for the long comment.

Could we also potentially add a `CHECK` to guard against having multiple in-flight requests?

My reasoning here is that we never call this method twice from our renderer process. We only call `GetTabStripData` once during page load.

I assume that on a page refresh, the entire WebUI stack is torn down: the C++ objects (controller and page handler) are destroyed along with any `pending_callback_`, the Mojo pipes are closed, and the JS objects are discarded. A new set of C++ and JS objects are then created, and the renderer issues a fresh `GetTabStripData()` call to the new handler. In summary, a stale pending_callback_ cannot survive a reload.

Similarly, if multiple `chrome://tab-strip-internals` tabs are open, each tab has its own independent C++ and JS WebUI instances. Each one calls GetTabStripData() exactly once on its own handler, so even in this scenario we never end up issuing multiple calls to the same handler instance.

We have below three options, all of which ensure we send response to the correct callback:

  • Early return (Drop duplicates)
  • Maintain a list of callbacks
  • Establish that only 1 in-flight request can be handled from the a single renderer (debug UI tab) at a time by adding a CHECK

I agree with the `early return` suggestion, just needed to confirm my understanding of object lifecycle in a WebUI, hence the comment.

Open in Gerrit

Related details

Attention is currently required from:
  • Darryl James
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
Gerrit-Change-Number: 7063490
Gerrit-PatchSet: 8
Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Darryl James <dlj...@chromium.org>
Gerrit-Comment-Date: Wed, 26 Nov 2025 21:35:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Darryl James <dlj...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Brijesh Giri (Gerrit)

unread,
Nov 26, 2025, 4:35:49 PM11/26/25
to Atharv Maan, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Darryl James

Brijesh Giri added 2 comments

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
Line 232, Patchset 7:// `components/sessions/core/session_types.h.h`
Darryl James . resolved

super nit: remove the additional `.h` 👍

Brijesh Giri

Done. Thanks for catching this!

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer.cc
Line 186, Patchset 6: last_session_windows_.push_back(DeepCopySessionWindow(window));
Brijesh Giri . resolved

@dlj...@chromium.org

Deep copying as a precaution in-case the caller of this observer method gets destroyed before this callback is fully processed.

`SessionRestore` passes a vector of raw pointers to `SessionWindow` objects to the observers, which could potentially be destroyed before the TabStripInternalsObserver is completed with its callback flow.

Darryl James

Let's add a brief comment to why we are deep copying here for future reference 👍

Brijesh Giri

Done

Gerrit-Comment-Date: Wed, 26 Nov 2025 21:35:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Darryl James (Gerrit)

unread,
Nov 26, 2025, 5:38:44 PM11/26/25
to Brijesh Giri, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Brijesh Giri

Darryl James added 1 comment

File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_handler.cc
Line 38, Patchset 7: pending_callback_ = std::move(callback);
Darryl James . resolved

Should we check if there are an already pending_callback_ before doing anything else? Maybe early return?

My worry is that this could get called multiple times and we end up overwriting the data and the wrong callback ends up getting called.

My preference would be to early return if there is an early callback. But depending on how we want to handle things, it would also be okay to store a list of pending callbacks that we process asynchronously / as they are called. But that might be more than we need in this case.

Brijesh Giri

Good idea. I admit that in-case of multiple calls, we would respond to the latest (incorrect) callback.

I have a chain of thought that I need to validate with you, apologies in advance for the long comment.

Could we also potentially add a `CHECK` to guard against having multiple in-flight requests?

My reasoning here is that we never call this method twice from our renderer process. We only call `GetTabStripData` once during page load.

I assume that on a page refresh, the entire WebUI stack is torn down: the C++ objects (controller and page handler) are destroyed along with any `pending_callback_`, the Mojo pipes are closed, and the JS objects are discarded. A new set of C++ and JS objects are then created, and the renderer issues a fresh `GetTabStripData()` call to the new handler. In summary, a stale pending_callback_ cannot survive a reload.

Similarly, if multiple `chrome://tab-strip-internals` tabs are open, each tab has its own independent C++ and JS WebUI instances. Each one calls GetTabStripData() exactly once on its own handler, so even in this scenario we never end up issuing multiple calls to the same handler instance.

We have below three options, all of which ensure we send response to the correct callback:

  • Early return (Drop duplicates)
  • Maintain a list of callbacks
  • Establish that only 1 in-flight request can be handled from the a single renderer (debug UI tab) at a time by adding a CHECK

I agree with the `early return` suggestion, just needed to confirm my understanding of object lifecycle in a WebUI, hence the comment.

Darryl James

Good question, my understanding is that in general everything gets torn down when the page is reloaded / a new render frame host is assigned to the web contents.

I wouldn't be surprised if there were caveats to this rule though. So playing it safe is preferred. If possible I would like to avoid CHECKs on the UI as that would crash the program when it doesn't have to. It's okay to show stale data in this case.

Open in Gerrit

Related details

Attention is currently required from:
  • Brijesh Giri
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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
    Gerrit-Change-Number: 7063490
    Gerrit-PatchSet: 8
    Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
    Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
    Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
    Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
    Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
    Gerrit-Comment-Date: Wed, 26 Nov 2025 22:38:38 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Darryl James (Gerrit)

    unread,
    Dec 5, 2025, 2:18:12 PM12/5/25
    to Brijesh Giri, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Brijesh Giri

    Darryl James added 1 comment

    File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_handler.cc
    Line 40, Patchset 8 (Latest): return;
    Darryl James . unresolved

    Let's also call `std::move(callback).Run(BuildSnapshot());` in this block. I want to prevent the UI from hanging if this is called multiple times and we have an in flight request. By running the snapshot immediately, stale data will return but that is okay provided the asynchronous data will update the page once it is done. Otherwise the user should be able to refresh the page to get the latest data 👍

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Brijesh Giri
    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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
      Gerrit-Change-Number: 7063490
      Gerrit-PatchSet: 8
      Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
      Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
      Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
      Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
      Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
      Gerrit-Comment-Date: Fri, 05 Dec 2025 19:18:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Brijesh Giri (Gerrit)

      unread,
      Dec 7, 2025, 6:48:08 PM12/7/25
      to Atharv Maan, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Darryl James

      Brijesh Giri added 1 comment

      File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_handler.cc
      Line 40, Patchset 8: return;
      Darryl James . resolved

      Let's also call `std::move(callback).Run(BuildSnapshot());` in this block. I want to prevent the UI from hanging if this is called multiple times and we have an in flight request. By running the snapshot immediately, stale data will return but that is okay provided the asynchronous data will update the page once it is done. Otherwise the user should be able to refresh the page to get the latest data 👍

      Brijesh Giri

      Done!

      PS: I tested out both the scenarios (hanging the UI as well as sending stale data). The UI lag is not that noticeable because the async call resolves pretty quickly.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Darryl James
      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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
        Gerrit-Change-Number: 7063490
        Gerrit-PatchSet: 9
        Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
        Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
        Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
        Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
        Gerrit-Attention: Darryl James <dlj...@chromium.org>
        Gerrit-Comment-Date: Sun, 07 Dec 2025 23:48:02 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Darryl James <dlj...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Atharv Maan (Gerrit)

        unread,
        Dec 11, 2025, 3:42:46 PM12/11/25
        to Brijesh Giri, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Brijesh Giri and Darryl James

        Atharv Maan added 5 comments

        File chrome/browser/ash/app_restore/full_restore_app_launch_handler.h
        Line 102, Patchset 9 (Latest): const std::vector<const sessions::SessionWindow*>& windows) override;
        Atharv Maan . unresolved

        forward declare this.

        File chrome/browser/sessions/session_restore.cc
        Line 544, Patchset 9 (Latest): windows_view.reserve(windows_.size());
        Atharv Maan . unresolved

        What's the difference in using `windows` vs `windows_`? Is there a reason why we switched to the class member `windows_`?

        File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_handler.h
        Line 20, Patchset 9 (Latest):namespace sessions {

        struct SessionWindow;

        } // namespace sessions
        Atharv Maan . unresolved

        supernit: remove the newlines inside namespace

        File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer.cc
        Line 19, Patchset 9 (Latest):std::unique_ptr<sessions::SessionTab> DeepCopySessionTab(
        Atharv Maan . unresolved

        IWYU

        File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_util.h
        Line 42, Patchset 9 (Latest): const std::vector<std::unique_ptr<sessions::SessionWindow>>& windows);
        Atharv Maan . unresolved

        include <memory> and <vector>

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Brijesh Giri
        • Darryl James
        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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 9
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Comment-Date: Thu, 11 Dec 2025 20:42:39 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brijesh Giri (Gerrit)

          unread,
          Dec 14, 2025, 11:18:49 PM12/14/25
          to Atharv Maan, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan and Darryl James

          Brijesh Giri added 5 comments

          File chrome/browser/ash/app_restore/full_restore_app_launch_handler.h
          Line 102, Patchset 9: const std::vector<const sessions::SessionWindow*>& windows) override;
          Atharv Maan . unresolved

          forward declare this.

          Brijesh Giri

          It is already forward-declared in the `c/b/sessions/session_restore_observer.h` header that this file depends due to inheritance i.e. `FullRestoreAppLaunchHandler` is a `SessionRestoreObserver` and needs to import it's header.

          File chrome/browser/sessions/session_restore.cc
          Line 544, Patchset 9: windows_view.reserve(windows_.size());
          Atharv Maan . unresolved

          What's the difference in using `windows` vs `windows_`? Is there a reason why we switched to the class member `windows_`?

          Brijesh Giri

          In the existing code `windows` gets copied over to `windows_` with the below comment and cleared immediately:

          ```
          // Copy windows into windows_ so that we can combine both app and browser
          // windows together before doing a one-pass restore.
          std::ranges::move(windows, std::back_inserter(windows_));
          SessionRestore::OnGotSession(profile(), for_apps, windows.size());
          windows.clear();
          ```

          Both are identical at the point when our newly added code gets executed:
          ```
          // Build a read-only view of the windows for the observers.
          std::vector<const sessions::SessionWindow*> windows_view;
          windows_view.reserve(windows_.size());
          for (const auto& w : windows_) {
          windows_view.push_back(w.get());
          }
          ```

          There was no specific reason for choosing one over the other, either of them work for our purpose of building a read-only view.

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_handler.h
          Line 20, Patchset 9:namespace sessions {


          struct SessionWindow;

          } // namespace sessions
          Atharv Maan . resolved

          supernit: remove the newlines inside namespace

          Brijesh Giri

          Done

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer.cc
          Line 19, Patchset 9:std::unique_ptr<sessions::SessionTab> DeepCopySessionTab(
          Atharv Maan . resolved

          IWYU

          Brijesh Giri

          Done

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_util.h
          Line 42, Patchset 9: const std::vector<std::unique_ptr<sessions::SessionWindow>>& windows);
          Atharv Maan . resolved

          include <memory> and <vector>

          Brijesh Giri

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Darryl James
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 10
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Mon, 15 Dec 2025 04:18:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Atharv Maan <athar...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Darryl James (Gerrit)

          unread,
          Dec 15, 2025, 2:46:31 PM12/15/25
          to Brijesh Giri, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan and Brijesh Giri

          Darryl James voted and added 2 comments

          Votes added by Darryl James

          Code-Review+1

          2 comments

          Patchset-level comments
          File-level comment, Patchset 10 (Latest):
          Darryl James . resolved

          lgtm!

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 21, Patchset 10 (Latest): // Session data that is saved on disk
          // to be restored on next startup after a crash.
          Darryl James . unresolved

          super nit: Let's wrap at 80 characters here per style guide 👍

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Brijesh Giri
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 10
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Mon, 15 Dec 2025 19:46:13 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brijesh Giri (Gerrit)

          unread,
          Dec 15, 2025, 7:35:06 PM12/15/25
          to Darryl James, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan and Darryl James

          Brijesh Giri added 1 comment

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 21, Patchset 10: // Session data that is saved on disk

          // to be restored on next startup after a crash.
          Darryl James . resolved

          super nit: Let's wrap at 80 characters here per style guide 👍

          Brijesh Giri

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Darryl James
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 12
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 16 Dec 2025 00:35:00 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Darryl James <dlj...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Darryl James (Gerrit)

          unread,
          Dec 16, 2025, 12:42:37 PM12/16/25
          to Brijesh Giri, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan and Brijesh Giri

          Darryl James voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Brijesh Giri
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 12
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 16 Dec 2025 17:42:23 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Atharv Maan (Gerrit)

          unread,
          Dec 16, 2025, 12:52:50 PM12/16/25
          to Brijesh Giri, Darryl James, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Brijesh Giri

          Atharv Maan added 3 comments

          Patchset-level comments
          File-level comment, Patchset 12 (Latest):
          Atharv Maan . unresolved

          We have zero test coverage for the added functionality. Let's add unit/browsertests for this CL.

          File chrome/browser/ash/app_restore/full_restore_app_launch_handler.h
          Line 102, Patchset 9: const std::vector<const sessions::SessionWindow*>& windows) override;
          Atharv Maan . unresolved

          forward declare this.

          Brijesh Giri

          It is already forward-declared in the `c/b/sessions/session_restore_observer.h` header that this file depends due to inheritance i.e. `FullRestoreAppLaunchHandler` is a `SessionRestoreObserver` and needs to import it's header.

          Atharv Maan

          Did some research on this - We should avoid transitive dependencies, and aim for each header file to be self-contained.

          Lets forward declare the `sessions::SessionWindow` class here.

          File chrome/browser/sessions/session_restore.cc
          Line 544, Patchset 9: windows_view.reserve(windows_.size());
          Atharv Maan . resolved

          What's the difference in using `windows` vs `windows_`? Is there a reason why we switched to the class member `windows_`?

          Brijesh Giri

          In the existing code `windows` gets copied over to `windows_` with the below comment and cleared immediately:

          ```
          // Copy windows into windows_ so that we can combine both app and browser
          // windows together before doing a one-pass restore.
          std::ranges::move(windows, std::back_inserter(windows_));
          SessionRestore::OnGotSession(profile(), for_apps, windows.size());
          windows.clear();
          ```

          Both are identical at the point when our newly added code gets executed:
          ```
          // Build a read-only view of the windows for the observers.
          std::vector<const sessions::SessionWindow*> windows_view;
          windows_view.reserve(windows_.size());
          for (const auto& w : windows_) {
          windows_view.push_back(w.get());
          }
          ```

          There was no specific reason for choosing one over the other, either of them work for our purpose of building a read-only view.

          Atharv Maan

          Acknowledged

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brijesh Giri
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 12
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Comment-Date: Tue, 16 Dec 2025 17:52:41 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Brijesh Giri <brijes...@gmail.com>
          Comment-In-Reply-To: Atharv Maan <athar...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brijesh Giri (Gerrit)

          unread,
          Dec 22, 2025, 10:17:24 PM12/22/25
          to Darryl James, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan

          Brijesh Giri added 1 comment

          File chrome/browser/ash/app_restore/full_restore_app_launch_handler.h
          Line 102, Patchset 9: const std::vector<const sessions::SessionWindow*>& windows) override;
          Atharv Maan . unresolved

          forward declare this.

          Brijesh Giri

          It is already forward-declared in the `c/b/sessions/session_restore_observer.h` header that this file depends due to inheritance i.e. `FullRestoreAppLaunchHandler` is a `SessionRestoreObserver` and needs to import it's header.

          Atharv Maan

          Did some research on this - We should avoid transitive dependencies, and aim for each header file to be self-contained.

          Lets forward declare the `sessions::SessionWindow` class here.

          Brijesh Giri

          I agree, however, I had a query.

          In this case, a `FullRestoreAppLaunchHandler` IS-A `SessionRestoreObserver` and will always need to import it's header by definition.

          Is it okay to rely on the parent class's forward declarations if there is an inheritance between two classes?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 12
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 23 Dec 2025 03:17:14 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          พันนา แสงทอง (Gerrit)

          unread,
          Jan 5, 2026, 4:02:40 AM (10 days ago) Jan 5
          to Brijesh Giri, Darryl James, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Brijesh Giri and Darryl James

          พันนา แสงทอง added 1 comment

          Patchset-level comments
          File-level comment, Patchset 12:
          Atharv Maan . resolved

          We have zero test coverage for the added functionality. Let's add unit/browsertests for this CL.

          พันนา แสงทอง

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Brijesh Giri
          • Darryl James
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 14
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Mon, 05 Jan 2026 09:02:11 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Atharv Maan <athar...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          gwsq (Gerrit)

          unread,
          Jan 5, 2026, 9:40:07 PM (9 days ago) Jan 5
          to Brijesh Giri, Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Darryl James, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Darryl James and Takashi Toyoshima

          Message from gwsq

          From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
          IPC: toyo...@chromium.org

          📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

          IPC reviewer(s): toyo...@chromium.org


          Reviewer source(s):
          toyo...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Darryl James
          • Takashi Toyoshima
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 17
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 06 Jan 2026 02:39:42 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Takashi Toyoshima (Gerrit)

          unread,
          Jan 5, 2026, 10:56:46 PM (9 days ago) Jan 5
          to Brijesh Giri, Chromium IPC Reviews, พันนา แสงทอง, Darryl James, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Brijesh Giri and Darryl James

          Takashi Toyoshima added 6 comments

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 242, Patchset 17 (Latest): int32 window_id;
          int32 tab_id;
          Takashi Toyoshima . unresolved

          How about defining `SessionID` to avoid unnecessary general type uses here?

          ```
          // This represents `components/sessions/core/session_id.h`
          struct SessionID {
          int32 id;
          }
          ```
          Line 255, Patchset 17 (Latest): string session_storage_persistent_id;
          Takashi Toyoshima . unresolved

          Can we have a clear comment on this?
          Generally, we discourage to use string type in mojom, but in this case, we need to pass the C++ side string as-is? In such a case, can we clarify how we use this string in the remote end?

          Line 256, Patchset 17 (Latest): string guid;
          Takashi Toyoshima . unresolved

          Hum... It seems this is std::string also in C++ side, but can we use base/uuid.h and mojo_base.mojom.Uuid for this guid value?

          Line 258, Patchset 17 (Latest): string title;
          Takashi Toyoshima . unresolved

          This is very trivial, but it's still nice to have a similar comment to the one for the `session_storage_persistent_id`.

          Line 279, Patchset 17 (Latest): int32 window_id;
          Takashi Toyoshima . unresolved

          ditto, SessionId.

          Line 280, Patchset 17 (Latest): string title;
          string workspace;
          Takashi Toyoshima . unresolved

          ditto, detailed comments for string uses.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Brijesh Giri
          • Darryl James
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 17
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 06 Jan 2026 03:56:22 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brijesh Giri (Gerrit)

          unread,
          Jan 6, 2026, 1:19:16 AM (9 days ago) Jan 6
          to Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Darryl James, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan and Darryl James

          Brijesh Giri added 1 comment

          File chrome/browser/ash/app_restore/full_restore_app_launch_handler.h
          Line 102, Patchset 9: const std::vector<const sessions::SessionWindow*>& windows) override;
          Atharv Maan . resolved

          forward declare this.

          Brijesh Giri

          It is already forward-declared in the `c/b/sessions/session_restore_observer.h` header that this file depends due to inheritance i.e. `FullRestoreAppLaunchHandler` is a `SessionRestoreObserver` and needs to import it's header.

          Atharv Maan

          Did some research on this - We should avoid transitive dependencies, and aim for each header file to be self-contained.

          Lets forward declare the `sessions::SessionWindow` class here.

          Brijesh Giri

          I agree, however, I had a query.

          In this case, a `FullRestoreAppLaunchHandler` IS-A `SessionRestoreObserver` and will always need to import it's header by definition.

          Is it okay to rely on the parent class's forward declarations if there is an inheritance between two classes?

          Brijesh Giri

          Added the forward declaration as per the comment.

          Thank You!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Darryl James
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 19
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 06 Jan 2026 06:19:10 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brijesh Giri (Gerrit)

          unread,
          Jan 6, 2026, 1:32:55 AM (9 days ago) Jan 6
          to Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Darryl James, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Darryl James and Takashi Toyoshima

          Brijesh Giri added 1 comment

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 242, Patchset 17: int32 window_id;
          int32 tab_id;
          Takashi Toyoshima . unresolved

          How about defining `SessionID` to avoid unnecessary general type uses here?

          ```
          // This represents `components/sessions/core/session_id.h`
          struct SessionID {
          int32 id;
          }
          ```
          Brijesh Giri

          Just providing some context here, this data always flows from the browser → renderer down the privilege gradient. It is only meant to display debugging information on a debug WebUI.

          Our understanding is that data validation with stronger types is required when data flows from renderer → browser, but for the opposite direction (browser → renderer), the renderer is allowed to trust the browser’s data.

          Reference: https://bit.ly/3XgRekg

          ```
          When passing objects up a privilege gradient (from less → more privileged), the callee must validate the inputs before acting on them. When passing objects down a privilege gradient, such as from browser → renderer, it is OK for the callee to trust the caller.
          ```

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Darryl James
          • Takashi Toyoshima
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 21
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 06 Jan 2026 06:32:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Darryl James (Gerrit)

          unread,
          Jan 6, 2026, 5:10:23 PM (8 days ago) Jan 6
          to Brijesh Giri, Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Brijesh Giri and Takashi Toyoshima

          Darryl James voted and added 2 comments

          Votes added by Darryl James

          Code-Review+1

          2 comments

          Patchset-level comments
          File-level comment, Patchset 22 (Latest):
          Darryl James . resolved

          lgtm % asks in .mojom and a question in the test

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer_browsertest.cc
          Line 52, Patchset 22 (Latest): // Session restore pref must be set to LAST to test browser close and
          // restore.
          SessionStartupPref pref(SessionStartupPref::LAST);
          SessionStartupPref::SetStartupPref(profile, pref);
          Darryl James . unresolved

          Was there a reason this needed to be moved out of SetUpOnMainThread?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Brijesh Giri
          • Takashi Toyoshima
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 22
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 06 Jan 2026 22:10:09 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brijesh Giri (Gerrit)

          unread,
          Jan 6, 2026, 5:14:59 PM (8 days ago) Jan 6
          to Darryl James, Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Darryl James and Takashi Toyoshima

          Brijesh Giri added 1 comment

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer_browsertest.cc
          Line 52, Patchset 22 (Latest): // Session restore pref must be set to LAST to test browser close and
          // restore.
          SessionStartupPref pref(SessionStartupPref::LAST);
          SessionStartupPref::SetStartupPref(profile, pref);
          Darryl James . unresolved

          Was there a reason this needed to be moved out of SetUpOnMainThread?

          Brijesh Giri

          This is not required for other tests so I moved it out of the common test fixture setup.

          Do let me know if there are any hard requirements about running it in the `SetUpOnMainThread` method.

          Thanks!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Darryl James
          • Takashi Toyoshima
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 06 Jan 2026 22:14:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Darryl James <dlj...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Darryl James (Gerrit)

          unread,
          Jan 6, 2026, 5:23:54 PM (8 days ago) Jan 6
          to Brijesh Giri, Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Brijesh Giri and Takashi Toyoshima

          Darryl James added 1 comment

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals_observer_browsertest.cc
          Line 52, Patchset 22 (Latest): // Session restore pref must be set to LAST to test browser close and
          // restore.
          SessionStartupPref pref(SessionStartupPref::LAST);
          SessionStartupPref::SetStartupPref(profile, pref);
          Darryl James . resolved

          Was there a reason this needed to be moved out of SetUpOnMainThread?

          Brijesh Giri

          This is not required for other tests so I moved it out of the common test fixture setup.

          Do let me know if there are any hard requirements about running it in the `SetUpOnMainThread` method.

          Thanks!

          Darryl James

          Got it - I don't have any problems if all of the tests that need the pref set flow through this function 👍

          Thanks!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Brijesh Giri
          • Takashi Toyoshima
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 06 Jan 2026 22:23:40 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Takashi Toyoshima (Gerrit)

          unread,
          Jan 7, 2026, 12:52:18 AM (8 days ago) Jan 7
          to Brijesh Giri, Darryl James, Chromium IPC Reviews, พันนา แสงทอง, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan and Brijesh Giri

          Takashi Toyoshima added 1 comment

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 242, Patchset 17: int32 window_id;
          int32 tab_id;
          Takashi Toyoshima . unresolved

          How about defining `SessionID` to avoid unnecessary general type uses here?

          ```
          // This represents `components/sessions/core/session_id.h`
          struct SessionID {
          int32 id;
          }
          ```
          Brijesh Giri

          Just providing some context here, this data always flows from the browser → renderer down the privilege gradient. It is only meant to display debugging information on a debug WebUI.

          Our understanding is that data validation with stronger types is required when data flows from renderer → browser, but for the opposite direction (browser → renderer), the renderer is allowed to trust the browser’s data.

          Reference: https://bit.ly/3XgRekg

          ```
          When passing objects up a privilege gradient (from less → more privileged), the callee must validate the inputs before acting on them. When passing objects down a privilege gradient, such as from browser → renderer, it is OK for the callee to trust the caller.
          ```

          Takashi Toyoshima

          We have a review guideline here.
          https://docs.google.com/document/d/1Kw4aTuISF7csHnjOpDJGc7JYIjlvOAKRprCTBVWw_E4/edit?tab=t.0#heading=h.zlvrdwxzhuu
          So, mojom prefers specific type rather than generic type, such as integers and string, regardless of the direction.

          Also, just in case, are these all in this file for debugging purpose?
          Otherwise, it's better to split the interface, and give it to the UI renderer only when the debugging is enabled.
          https://docs.google.com/document/d/1Kw4aTuISF7csHnjOpDJGc7JYIjlvOAKRprCTBVWw_E4/edit?tab=t.0#heading=h.hus2vlat0wvq

          This comes from the section, "Scope capabilities and privileges with separate interfaces".

          But, IIUC, these all are for chrome://tab-strip-internals/ and this interface is given only to renderers that host it. In such a case, please ignore my second comment above.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Brijesh Giri
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 22
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Wed, 07 Jan 2026 05:51:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
          Comment-In-Reply-To: Brijesh Giri <brijes...@gmail.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brijesh Giri (Gerrit)

          unread,
          Jan 13, 2026, 4:22:14 AM (yesterday) Jan 13
          to Darryl James, Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Atharv Maan, Darryl James and Takashi Toyoshima

          Brijesh Giri added 7 comments

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 67, Patchset 22: string node_id;
          Brijesh Giri . unresolved

          toyo...@chromium.org

          Given the opaque nature of this property would it be okay to store it as a string?

          Line 242, Patchset 17: int32 window_id;
          int32 tab_id;
          Takashi Toyoshima . unresolved

          How about defining `SessionID` to avoid unnecessary general type uses here?

          ```
          // This represents `components/sessions/core/session_id.h`
          struct SessionID {
          int32 id;
          }
          ```
          Brijesh Giri

          Just providing some context here, this data always flows from the browser → renderer down the privilege gradient. It is only meant to display debugging information on a debug WebUI.

          Our understanding is that data validation with stronger types is required when data flows from renderer → browser, but for the opposite direction (browser → renderer), the renderer is allowed to trust the browser’s data.

          Reference: https://bit.ly/3XgRekg

          ```
          When passing objects up a privilege gradient (from less → more privileged), the callee must validate the inputs before acting on them. When passing objects down a privilege gradient, such as from browser → renderer, it is OK for the callee to trust the caller.
          ```

          Takashi Toyoshima

          We have a review guideline here.
          https://docs.google.com/document/d/1Kw4aTuISF7csHnjOpDJGc7JYIjlvOAKRprCTBVWw_E4/edit?tab=t.0#heading=h.zlvrdwxzhuu
          So, mojom prefers specific type rather than generic type, such as integers and string, regardless of the direction.

          Also, just in case, are these all in this file for debugging purpose?
          Otherwise, it's better to split the interface, and give it to the UI renderer only when the debugging is enabled.
          https://docs.google.com/document/d/1Kw4aTuISF7csHnjOpDJGc7JYIjlvOAKRprCTBVWw_E4/edit?tab=t.0#heading=h.hus2vlat0wvq

          This comes from the section, "Scope capabilities and privileges with separate interfaces".

          But, IIUC, these all are for chrome://tab-strip-internals/ and this interface is given only to renderers that host it. In such a case, please ignore my second comment above.

          Brijesh Giri

          Regarding point 2 (splitting the interface), yes, I can confirm that all the fields in this mojom file are meant to display read-only debugging information in `chrome://tab-strip-internals`.

          The overall goal of this page is to provide quick access to TabStrip and SessionRestore information to help developers debug tab behavior.

          PS: I have declared the rqeuired type, please let me know if it's as per expectations.

          Line 255, Patchset 17: string session_storage_persistent_id;
          Takashi Toyoshima . unresolved

          Can we have a clear comment on this?
          Generally, we discourage to use string type in mojom, but in this case, we need to pass the C++ side string as-is? In such a case, can we clarify how we use this string in the remote end?

          Brijesh Giri

          @dlj...@chromium.org

          Please let me know if the provide comment is as per expectations.

          Takashi Toyoshima . unresolved

          Hum... It seems this is std::string also in C++ side, but can we use base/uuid.h and mojo_base.mojom.Uuid for this guid value?

          Brijesh Giri

          @dlj...@chromium.org

          Need a little help to get more insights into what this field represents and why we store this field as a string in `components/sessions/core/session_types.h` instead of a `base/uuid.h`

          Is this `guid` unique across sessions?

          Line 258, Patchset 17: string title;
          Takashi Toyoshima . resolved

          This is very trivial, but it's still nice to have a similar comment to the one for the `session_storage_persistent_id`.

          Brijesh Giri

          Done

          Line 279, Patchset 17: int32 window_id;
          Takashi Toyoshima . resolved

          ditto, SessionId.

          Brijesh Giri

          Done

          Line 280, Patchset 17: string title;
          string workspace;
          Takashi Toyoshima . unresolved

          ditto, detailed comments for string uses.

          Brijesh Giri

          Please let me know if the provide comment is as per expectations.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Atharv Maan
          • Darryl James
          • Takashi Toyoshima
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 23
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-Attention: Darryl James <dlj...@chromium.org>
          Gerrit-Attention: Atharv Maan <athar...@chromium.org>
          Gerrit-Comment-Date: Tue, 13 Jan 2026 09:22:06 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Darryl James (Gerrit)

          unread,
          Jan 13, 2026, 12:34:19 PM (yesterday) Jan 13
          to Brijesh Giri, Chromium IPC Reviews, Takashi Toyoshima, พันนา แสงทอง, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Brijesh Giri and Takashi Toyoshima

          Darryl James added 2 comments

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 255, Patchset 17: string session_storage_persistent_id;
          Takashi Toyoshima . unresolved

          Can we have a clear comment on this?
          Generally, we discourage to use string type in mojom, but in this case, we need to pass the C++ side string as-is? In such a case, can we clarify how we use this string in the remote end?

          Brijesh Giri

          @dlj...@chromium.org

          Please let me know if the provide comment is as per expectations.

          Darryl James

          I did some digging to verify this and it appears that this field is unique across all sessions - [reference here](https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/session_storage_namespace.h;drc=5a250038051d51f9573947ccf0f77f72da780725;bpv=1;bpt=1;l=21#:~:text=//%20Returns%20the%20ID,across%20browser%20runs.)

          Let's update the comment to reflect that 👍

          Takashi Toyoshima . unresolved

          Hum... It seems this is std::string also in C++ side, but can we use base/uuid.h and mojo_base.mojom.Uuid for this guid value?

          Brijesh Giri

          @dlj...@chromium.org

          Need a little help to get more insights into what this field represents and why we store this field as a string in `components/sessions/core/session_types.h` instead of a `base/uuid.h`

          Is this `guid` unique across sessions?

          Darryl James

          In this one, guid is a way to associate the specific tab being worked with. It was introduced in [this CL](https://chromium-review.googlesource.com/c/chromium/src/+/2093691).

          This allows the embedder to associate and persist state with a tab. Though I wasn't able to find any callers or usages for this field. I am surprised this is even getting populated at this point in time.

          My thoughts here are to leave the field in the struct that way there is a 1:1 mapping between mojom and c++, and update the comment. Separately, in the future double back and see if this field can be removed entirely if it is genuinely unused.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brijesh Giri
          • Takashi Toyoshima
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Comment-Date: Tue, 13 Jan 2026 17:34:05 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Takashi Toyoshima (Gerrit)

          unread,
          7:42 PM (2 hours ago) 7:42 PM
          to Brijesh Giri, Darryl James, Chromium IPC Reviews, พันนา แสงทอง, Atharv Maan, Chromium LUCI CQ, chromium...@chromium.org
          Attention needed from Brijesh Giri

          Takashi Toyoshima added 3 comments

          File chrome/browser/ui/webui/tab_strip_internals/tab_strip_internals.mojom
          Line 242, Patchset 17: int32 window_id;
          int32 tab_id;
          Takashi Toyoshima . resolved

          How about defining `SessionID` to avoid unnecessary general type uses here?

          ```
          // This represents `components/sessions/core/session_id.h`
          struct SessionID {
          int32 id;
          }
          ```
          Brijesh Giri

          Just providing some context here, this data always flows from the browser → renderer down the privilege gradient. It is only meant to display debugging information on a debug WebUI.

          Our understanding is that data validation with stronger types is required when data flows from renderer → browser, but for the opposite direction (browser → renderer), the renderer is allowed to trust the browser’s data.

          Reference: https://bit.ly/3XgRekg

          ```
          When passing objects up a privilege gradient (from less → more privileged), the callee must validate the inputs before acting on them. When passing objects down a privilege gradient, such as from browser → renderer, it is OK for the callee to trust the caller.
          ```

          Takashi Toyoshima

          We have a review guideline here.
          https://docs.google.com/document/d/1Kw4aTuISF7csHnjOpDJGc7JYIjlvOAKRprCTBVWw_E4/edit?tab=t.0#heading=h.zlvrdwxzhuu
          So, mojom prefers specific type rather than generic type, such as integers and string, regardless of the direction.

          Also, just in case, are these all in this file for debugging purpose?
          Otherwise, it's better to split the interface, and give it to the UI renderer only when the debugging is enabled.
          https://docs.google.com/document/d/1Kw4aTuISF7csHnjOpDJGc7JYIjlvOAKRprCTBVWw_E4/edit?tab=t.0#heading=h.hus2vlat0wvq

          This comes from the section, "Scope capabilities and privileges with separate interfaces".

          But, IIUC, these all are for chrome://tab-strip-internals/ and this interface is given only to renderers that host it. In such a case, please ignore my second comment above.

          Brijesh Giri

          Regarding point 2 (splitting the interface), yes, I can confirm that all the fields in this mojom file are meant to display read-only debugging information in `chrome://tab-strip-internals`.

          The overall goal of this page is to provide quick access to TabStrip and SessionRestore information to help developers debug tab behavior.

          PS: I have declared the rqeuired type, please let me know if it's as per expectations.

          Takashi Toyoshima

          thank you for your double check, and update the SessionID.
          LGTM.

          Takashi Toyoshima . unresolved

          Hum... It seems this is std::string also in C++ side, but can we use base/uuid.h and mojo_base.mojom.Uuid for this guid value?

          Brijesh Giri

          @dlj...@chromium.org

          Need a little help to get more insights into what this field represents and why we store this field as a string in `components/sessions/core/session_types.h` instead of a `base/uuid.h`

          Is this `guid` unique across sessions?

          Darryl James

          In this one, guid is a way to associate the specific tab being worked with. It was introduced in [this CL](https://chromium-review.googlesource.com/c/chromium/src/+/2093691).

          This allows the embedder to associate and persist state with a tab. Though I wasn't able to find any callers or usages for this field. I am surprised this is even getting populated at this point in time.

          My thoughts here are to leave the field in the struct that way there is a 1:1 mapping between mojom and c++, and update the comment. Separately, in the future double back and see if this field can be removed entirely if it is genuinely unused.

          Takashi Toyoshima

          The plan SGTM

          Line 280, Patchset 17: string title;
          string workspace;
          Takashi Toyoshima . resolved

          ditto, detailed comments for string uses.

          Brijesh Giri

          Please let me know if the provide comment is as per expectations.

          Takashi Toyoshima

          Acknowledged

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Brijesh Giri
          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: I7e914db14ab111885a31a9242d4be0e8c2efeec1
          Gerrit-Change-Number: 7063490
          Gerrit-PatchSet: 23
          Gerrit-Owner: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Atharv Maan <athar...@chromium.org>
          Gerrit-Reviewer: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: gwsq
          Gerrit-CC: พันนา แสงทอง <fantar...@gmail.com>
          Gerrit-Attention: Brijesh Giri <brijes...@gmail.com>
          Gerrit-Comment-Date: Thu, 15 Jan 2026 00:41:34 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
          Comment-In-Reply-To: Brijesh Giri <brijes...@gmail.com>
          Comment-In-Reply-To: Darryl James <dlj...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages