Retrieve SupportedProfileType when restoring from persistent/saved state [chromium/src : main]

0 views
Skip to first unread message

Shu Yang (Gerrit)

unread,
Dec 23, 2025, 2:32:25 PM (4 days ago) Dec 23
to Michael Wu, Charles Hager, Sirisha Kavuluru, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
Attention needed from Charles Hager, Michael Wu and Sirisha Kavuluru

Shu Yang added 1 comment

File chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
Line 3589, Patchset 5 (Latest): }
Shu Yang . unresolved

Since there is no else clause, mSupportedProfileType may still be uninitialized.
Just want to make sure this is intended.

Open in Gerrit

Related details

Attention is currently required from:
  • Charles Hager
  • Michael Wu
  • Sirisha Kavuluru
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: Ia71840ce83d4aebfa7a24a2ffc461380cd0ad0ec
Gerrit-Change-Number: 7274173
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Wu <mk...@google.com>
Gerrit-Reviewer: Charles Hager <clh...@google.com>
Gerrit-Reviewer: Michael Wu <mk...@google.com>
Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
Gerrit-CC: Shu Yang <shu...@google.com>
Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
Gerrit-Attention: Michael Wu <mk...@google.com>
Gerrit-Attention: Charles Hager <clh...@google.com>
Gerrit-Comment-Date: Tue, 23 Dec 2025 19:32:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Charles Hager (Gerrit)

unread,
Dec 23, 2025, 2:56:01 PM (4 days ago) Dec 23
to Michael Wu, Sirisha Kavuluru, Shu Yang, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
Attention needed from Michael Wu and Sirisha Kavuluru

Charles Hager added 1 comment

File chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
Shu Yang . unresolved

Since there is no else clause, mSupportedProfileType may still be uninitialized.
Just want to make sure this is intended.

Charles Hager

I think we probably want the profile type to always be initialized.....what should be the fallback here? When might the multi-instance manager be null?

Maybe we should add a fallback and also emit a histogram to keep tabs on how common (or rare) this is?

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Wu
  • Sirisha Kavuluru
Gerrit-Comment-Date: Tue, 23 Dec 2025 19:55:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Shu Yang <shu...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Wu (Gerrit)

unread,
Dec 23, 2025, 5:46:08 PM (4 days ago) Dec 23
to Chromium Metrics Reviews, Charles Hager, Sirisha Kavuluru, Shu Yang, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
Attention needed from Charles Hager, Shu Yang and Sirisha Kavuluru

Michael Wu added 1 comment

File chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
Line 3589, Patchset 5: }
Shu Yang . resolved

Since there is no else clause, mSupportedProfileType may still be uninitialized.
Just want to make sure this is intended.

Charles Hager

I think we probably want the profile type to always be initialized.....what should be the fallback here? When might the multi-instance manager be null?

Maybe we should add a fallback and also emit a histogram to keep tabs on how common (or rare) this is?

Michael Wu

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Charles Hager
  • Shu Yang
  • Sirisha Kavuluru
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: Ia71840ce83d4aebfa7a24a2ffc461380cd0ad0ec
    Gerrit-Change-Number: 7274173
    Gerrit-PatchSet: 7
    Gerrit-Owner: Michael Wu <mk...@google.com>
    Gerrit-Reviewer: Charles Hager <clh...@google.com>
    Gerrit-Reviewer: Michael Wu <mk...@google.com>
    Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Shu Yang <shu...@google.com>
    Gerrit-Attention: Shu Yang <shu...@google.com>
    Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
    Gerrit-Attention: Charles Hager <clh...@google.com>
    Gerrit-Comment-Date: Tue, 23 Dec 2025 22:45:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Shu Yang <shu...@google.com>
    Comment-In-Reply-To: Charles Hager <clh...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Charles Hager (Gerrit)

    unread,
    Dec 23, 2025, 6:42:31 PM (4 days ago) Dec 23
    to Michael Wu, Chromium Metrics Reviews, Sirisha Kavuluru, Shu Yang, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
    Attention needed from Michael Wu, Shu Yang and Sirisha Kavuluru

    Charles Hager added 2 comments

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Charles Hager . resolved

    LGTM overall

    File chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtils.java
    Line 655, Patchset 7 (Latest): public static @SupportedProfileType int readProfileType(int instanceId) {
    Charles Hager . unresolved

    Nit: JavaDocs

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Wu
    • Shu Yang
    • Sirisha Kavuluru
    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: Ia71840ce83d4aebfa7a24a2ffc461380cd0ad0ec
      Gerrit-Change-Number: 7274173
      Gerrit-PatchSet: 7
      Gerrit-Owner: Michael Wu <mk...@google.com>
      Gerrit-Reviewer: Charles Hager <clh...@google.com>
      Gerrit-Reviewer: Michael Wu <mk...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Shu Yang <shu...@google.com>
      Gerrit-Attention: Shu Yang <shu...@google.com>
      Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Attention: Michael Wu <mk...@google.com>
      Gerrit-Comment-Date: Tue, 23 Dec 2025 23:42:20 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Shu Yang (Gerrit)

      unread,
      Dec 23, 2025, 9:30:58 PM (4 days ago) Dec 23
      to Michael Wu, Chromium Metrics Reviews, Charles Hager, Sirisha Kavuluru, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
      Attention needed from Michael Wu and Sirisha Kavuluru

      Shu Yang added 1 comment

      File chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
      Line 3612, Patchset 7 (Latest): mSupportedProfileType = SupportedProfileType.MIXED;
      Shu Yang . unresolved

      From non-owner perspective:
      Comparing with the original CL:
      https://chromium-review.googlesource.com/c/chromium/src/+/7208039/10/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
      The else clause used to has mWindowId == 0, which is a valid window id.
      And we used to follow the normal procedure to determine mSupportedProfileType (based on FF/intent/ChromeSharedPreferences). Now we force it to SupportedProfileType.MIXED, which might be a behavior change.
      But whether this is Okay depends on when we will get into the else clause.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Michael Wu
      • Sirisha Kavuluru
      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: Ia71840ce83d4aebfa7a24a2ffc461380cd0ad0ec
      Gerrit-Change-Number: 7274173
      Gerrit-PatchSet: 7
      Gerrit-Owner: Michael Wu <mk...@google.com>
      Gerrit-Reviewer: Charles Hager <clh...@google.com>
      Gerrit-Reviewer: Michael Wu <mk...@google.com>
      Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Shu Yang <shu...@google.com>
      Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
      Gerrit-Attention: Michael Wu <mk...@google.com>
      Gerrit-Comment-Date: Wed, 24 Dec 2025 02:30:46 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Michael Wu (Gerrit)

      unread,
      Dec 26, 2025, 12:56:53 PM (yesterday) Dec 26
      to Chromium Metrics Reviews, Charles Hager, Sirisha Kavuluru, Shu Yang, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, eme-r...@chromium.org, feature-me...@chromium.org
      Attention needed from Sirisha Kavuluru

      Michael Wu added 2 comments

      File chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
      Line 3612, Patchset 7: mSupportedProfileType = SupportedProfileType.MIXED;
      Shu Yang . resolved

      From non-owner perspective:
      Comparing with the original CL:
      https://chromium-review.googlesource.com/c/chromium/src/+/7208039/10/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
      The else clause used to has mWindowId == 0, which is a valid window id.
      And we used to follow the normal procedure to determine mSupportedProfileType (based on FF/intent/ChromeSharedPreferences). Now we force it to SupportedProfileType.MIXED, which might be a behavior change.
      But whether this is Okay depends on when we will get into the else clause.

      Michael Wu

      Since we don't know when the else clause occurs, using the normal procedure to determine supportedProfileType makes sense to me.

      File chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtils.java
      Line 655, Patchset 7: public static @SupportedProfileType int readProfileType(int instanceId) {
      Charles Hager . resolved

      Nit: JavaDocs

      Michael Wu

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Sirisha Kavuluru
      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: Ia71840ce83d4aebfa7a24a2ffc461380cd0ad0ec
        Gerrit-Change-Number: 7274173
        Gerrit-PatchSet: 8
        Gerrit-Owner: Michael Wu <mk...@google.com>
        Gerrit-Reviewer: Charles Hager <clh...@google.com>
        Gerrit-Reviewer: Michael Wu <mk...@google.com>
        Gerrit-Reviewer: Sirisha Kavuluru <skav...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Shu Yang <shu...@google.com>
        Gerrit-Attention: Sirisha Kavuluru <skav...@google.com>
        Gerrit-Comment-Date: Fri, 26 Dec 2025 17:56:42 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages