extensions: Enable chrome.tabGroups.update() API on desktop Android [chromium/src : main]

0 views
Skip to first unread message

James Cook (Gerrit)

unread,
Jan 7, 2026, 6:17:37 PM (2 days ago) Jan 7
to Zoraiz Naeem, Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Zoraiz Naeem

James Cook added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
James Cook . resolved

Zoraiz, yet another one. Thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Zoraiz Naeem
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
Gerrit-Change-Number: 7412262
Gerrit-PatchSet: 2
Gerrit-Owner: James Cook <jame...@chromium.org>
Gerrit-Reviewer: James Cook <jame...@chromium.org>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Comment-Date: Wed, 07 Jan 2026 23:17:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Zoraiz Naeem (Gerrit)

unread,
Jan 7, 2026, 8:35:58 PM (2 days ago) Jan 7
to James Cook, Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from James Cook

Zoraiz Naeem added 3 comments

File chrome/browser/extensions/api/tab_groups/tab_groups_api.cc
Line 262, Patchset 2 (Latest): // Android does not have a SupportsTabGroups() method.
Zoraiz Naeem . unresolved

Even if its not supported, we can still use the new interfaces right (Just for consistency) or the new interfaces are yet fully back compatible?

File chrome/browser/extensions/api/tab_groups/tab_groups_api_browsertest.cc
Line 389, Patchset 2 (Latest): ASSERT_TRUE(group.has_value());
Zoraiz Naeem . unresolved

nit: ASSERT_TRUE(group);

`ASSERT_TRUE(std::optional<T>);` directly checks for the value. So a bit less code.

Line 409, Patchset 2 (Latest): ASSERT_TRUE(new_visual_data.has_value());
Zoraiz Naeem . unresolved

nit: `ASSERT_TRUE(new_visual_data)`

Open in Gerrit

Related details

Attention is currently required from:
  • James Cook
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
    Gerrit-Change-Number: 7412262
    Gerrit-PatchSet: 2
    Gerrit-Owner: James Cook <jame...@chromium.org>
    Gerrit-Reviewer: James Cook <jame...@chromium.org>
    Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Attention: James Cook <jame...@chromium.org>
    Gerrit-Comment-Date: Thu, 08 Jan 2026 01:35:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    James Cook (Gerrit)

    unread,
    Jan 7, 2026, 9:02:30 PM (2 days ago) Jan 7
    to Zoraiz Naeem, Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Zoraiz Naeem

    James Cook added 4 comments

    Patchset-level comments
    File-level comment, Patchset 3 (Latest):
    James Cook . resolved

    Zoraiz, please take another look.

    File chrome/browser/extensions/api/tab_groups/tab_groups_api.cc
    Line 262, Patchset 2: // Android does not have a SupportsTabGroups() method.
    Zoraiz Naeem . resolved

    Even if its not supported, we can still use the new interfaces right (Just for consistency) or the new interfaces are yet fully back compatible?

    James Cook

    In this case, the new interfaces aren't fully backwards compatible. :-( Fortunately the things that don't support tab groups are things like Chrome Apps, which are not supported on Android.

    File chrome/browser/extensions/api/tab_groups/tab_groups_api_browsertest.cc
    Line 389, Patchset 2: ASSERT_TRUE(group.has_value());
    Zoraiz Naeem . resolved

    nit: ASSERT_TRUE(group);

    `ASSERT_TRUE(std::optional<T>);` directly checks for the value. So a bit less code.

    James Cook

    Done.

    FWIW I like to use has_value() so I don't have to think about cases like this:
    ```
    std::optional<bool> foo = false;
    ASSERT_TRUE(foo);
    ```
    Is naked `foo` true-ish or false-ish? It's true-ish, but I have to think about it. :-)

    Line 409, Patchset 2: ASSERT_TRUE(new_visual_data.has_value());
    Zoraiz Naeem . resolved

    nit: `ASSERT_TRUE(new_visual_data)`

    James Cook

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Zoraiz Naeem
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
      Gerrit-Change-Number: 7412262
      Gerrit-PatchSet: 3
      Gerrit-Owner: James Cook <jame...@chromium.org>
      Gerrit-Reviewer: James Cook <jame...@chromium.org>
      Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
      Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-Comment-Date: Thu, 08 Jan 2026 02:02:14 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Zoraiz Naeem <zorai...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Zoraiz Naeem (Gerrit)

      unread,
      Jan 7, 2026, 9:10:34 PM (2 days ago) Jan 7
      to James Cook, Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
      Attention needed from James Cook

      Zoraiz Naeem voted and added 2 comments

      Votes added by Zoraiz Naeem

      Code-Review+1

      2 comments

      Patchset-level comments
      Zoraiz Naeem . resolved

      lgtm!

      File chrome/browser/extensions/api/tab_groups/tab_groups_api_browsertest.cc
      Line 389, Patchset 2: ASSERT_TRUE(group.has_value());
      Zoraiz Naeem . resolved

      nit: ASSERT_TRUE(group);

      `ASSERT_TRUE(std::optional<T>);` directly checks for the value. So a bit less code.

      James Cook

      Done.

      FWIW I like to use has_value() so I don't have to think about cases like this:
      ```
      std::optional<bool> foo = false;
      ASSERT_TRUE(foo);
      ```
      Is naked `foo` true-ish or false-ish? It's true-ish, but I have to think about it. :-)

      Zoraiz Naeem

      From syntax point I think of optionals as unique_ptr/ptrs. But I must agree that in the examples as above, it makes sense to use `.value()`. I tend to not to use `value()` unless it provides clarity.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • James Cook
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
        Gerrit-Change-Number: 7412262
        Gerrit-PatchSet: 3
        Gerrit-Owner: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
        Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Attention: James Cook <jame...@chromium.org>
        Gerrit-Comment-Date: Thu, 08 Jan 2026 02:10:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: James Cook <jame...@chromium.org>
        Comment-In-Reply-To: Zoraiz Naeem <zorai...@chromium.org>
        satisfied_requirement
        open
        diffy

        Zoraiz Naeem (Gerrit)

        unread,
        Jan 7, 2026, 9:13:04 PM (2 days ago) Jan 7
        to James Cook, Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
        Attention needed from James Cook

        Zoraiz Naeem added 1 comment

        File chrome/browser/extensions/api/tab_groups/tab_groups_api.cc
        Line 262, Patchset 2: // Android does not have a SupportsTabGroups() method.
        Zoraiz Naeem . resolved

        Even if its not supported, we can still use the new interfaces right (Just for consistency) or the new interfaces are yet fully back compatible?

        James Cook

        In this case, the new interfaces aren't fully backwards compatible. :-( Fortunately the things that don't support tab groups are things like Chrome Apps, which are not supported on Android.

        Zoraiz Naeem

        out of curiosity, do we plan to make them compatibly? (So that we just use these interfaces across the codebase without thinking)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • James Cook
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
        Gerrit-Change-Number: 7412262
        Gerrit-PatchSet: 3
        Gerrit-Owner: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
        Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Attention: James Cook <jame...@chromium.org>
        Gerrit-Comment-Date: Thu, 08 Jan 2026 02:12:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        open
        diffy

        James Cook (Gerrit)

        unread,
        Jan 7, 2026, 9:14:44 PM (2 days ago) Jan 7
        to Zoraiz Naeem, Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

        James Cook added 2 comments

        Patchset-level comments
        James Cook . resolved

        Thanks for the review!

        File chrome/browser/extensions/api/tab_groups/tab_groups_api.cc
        Line 262, Patchset 2: // Android does not have a SupportsTabGroups() method.
        Zoraiz Naeem . resolved

        Even if its not supported, we can still use the new interfaces right (Just for consistency) or the new interfaces are yet fully back compatible?

        James Cook

        In this case, the new interfaces aren't fully backwards compatible. :-( Fortunately the things that don't support tab groups are things like Chrome Apps, which are not supported on Android.

        Zoraiz Naeem

        out of curiosity, do we plan to make them compatibly? (So that we just use these interfaces across the codebase without thinking)

        James Cook

        Yeah, I think the plan is to move them slowly towards being more compatible. I've done a little bit of that with the tabGroups API changes. But there's a lot left to do. I think there are a couple folks on the Clank team looking at it.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
        Gerrit-Change-Number: 7412262
        Gerrit-PatchSet: 3
        Gerrit-Owner: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
        Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Comment-Date: Thu, 08 Jan 2026 02:14:33 +0000
        satisfied_requirement
        open
        diffy

        James Cook (Gerrit)

        unread,
        Jan 8, 2026, 2:20:55 PM (20 hours ago) Jan 8
        to Zoraiz Naeem, Achuith Bhandarkar, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

        James Cook voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
        Gerrit-Change-Number: 7412262
        Gerrit-PatchSet: 3
        Gerrit-Owner: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
        Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
        Gerrit-Comment-Date: Thu, 08 Jan 2026 19:20:42 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jan 8, 2026, 2:25:02 PM (20 hours ago) Jan 8
        to James Cook, Zoraiz Naeem, Achuith Bhandarkar, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        extensions: Enable chrome.tabGroups.update() API on desktop Android

        Rewrite the API implementation to use the cross-platform
        BrowserWindowInterface and TabListInterface. Do the same for the
        browser tests.
        Bug: 405219902
        Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
        Reviewed-by: Zoraiz Naeem <zorai...@chromium.org>
        Commit-Queue: James Cook <jame...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1566455}
        Files:
        • M chrome/browser/extensions/api/tab_groups/BUILD.gn
        • M chrome/browser/extensions/api/tab_groups/tab_groups_api.cc
        • M chrome/browser/extensions/api/tab_groups/tab_groups_api_browsertest.cc
        • M chrome/browser/extensions/extension_tab_util.h
        Change size: M
        Delta: 4 files changed, 34 insertions(+), 26 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Zoraiz Naeem
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I887c73d827b25ce90d6ddd2c5e9a1e59040250e5
        Gerrit-Change-Number: 7412262
        Gerrit-PatchSet: 4
        Gerrit-Owner: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: James Cook <jame...@chromium.org>
        Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
        Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages