[SmartRestart] Add UpdateOnZeroWindowEnabled enterprise policy [chromium/src : main]

0 views
Skip to first unread message

gwsq (Gerrit)

unread,
Jul 7, 2026, 5:05:59 PM (2 days ago) Jul 7
to Victor Tan, Enterprise Policy Reviews, Alexander Hendrich, Darryl James, Mike Taylor, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org
Attention needed from Alexander Hendrich, Darryl James and Mike Taylor

Message from gwsq

Reviewer source(s):
hend...@chromium.org is from context(chrome/enterprise/gwsq/enterprise-policy-review.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Hendrich
  • Darryl James
  • Mike Taylor
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: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
Gerrit-Change-Number: 8031982
Gerrit-PatchSet: 10
Gerrit-Owner: Victor Tan <vict...@chromium.org>
Gerrit-Reviewer: Alexander Hendrich <hend...@chromium.org>
Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
Gerrit-Reviewer: Mike Taylor <mike...@chromium.org>
Gerrit-Reviewer: Victor Tan <vict...@chromium.org>
Gerrit-CC: Brandon Seils <bse...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-CC: gwsq
Gerrit-Attention: Alexander Hendrich <hend...@chromium.org>
Gerrit-Attention: Darryl James <dlj...@chromium.org>
Gerrit-Attention: Mike Taylor <mike...@chromium.org>
Gerrit-Comment-Date: Tue, 07 Jul 2026 21:05:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mike Taylor (Gerrit)

unread,
Jul 8, 2026, 10:17:52 AM (yesterday) Jul 8
to Victor Tan, Enterprise Policy Reviews, Alexander Hendrich, Darryl James, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org
Attention needed from Alexander Hendrich, Darryl James and Victor Tan

Mike Taylor voted and added 1 comment

Votes added by Mike Taylor

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 11 (Latest):
Mike Taylor . resolved

components/policy/resources/templates/policy_definitions/Miscellaneous/UpdateOnZeroWindowEnabled.yaml LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Hendrich
  • Darryl James
  • Victor Tan
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
    Gerrit-Change-Number: 8031982
    Gerrit-PatchSet: 11
    Gerrit-Owner: Victor Tan <vict...@chromium.org>
    Gerrit-Reviewer: Alexander Hendrich <hend...@chromium.org>
    Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
    Gerrit-Reviewer: Mike Taylor <mike...@chromium.org>
    Gerrit-Reviewer: Victor Tan <vict...@chromium.org>
    Gerrit-CC: Brandon Seils <bse...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Alexander Hendrich <hend...@chromium.org>
    Gerrit-Attention: Victor Tan <vict...@chromium.org>
    Gerrit-Attention: Darryl James <dlj...@chromium.org>
    Gerrit-Comment-Date: Wed, 08 Jul 2026 14:17:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Darryl James (Gerrit)

    unread,
    Jul 8, 2026, 2:20:25 PM (23 hours ago) Jul 8
    to Victor Tan, Mike Taylor, Enterprise Policy Reviews, Alexander Hendrich, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org
    Attention needed from Alexander Hendrich and Victor Tan

    Darryl James added 5 comments

    Patchset-level comments
    Darryl James . resolved

    Shape looks good; small asks 👍; thanks!

    File chrome/browser/lifetime/smart_restart_manager_browsertest.cc
    Line 200, Patchset 11 (Parent): histogram_tester.ExpectTotalCount(
    "Session.SmartRestart.ZeroWindow.ExecutionOutcome", 0);
    Darryl James . unresolved

    Should this expectation be preserved in the updated test?

    File chrome/browser/lifetime/smart_restart_policy.cc
    Line 29, Patchset 11 (Latest):bool IsZeroWindowBlockedByEnterprisePolicy() {
    Darryl James . unresolved

    Can this be renamed to something like `SupportsZeroWindowRestarts` or similar? This way the implementation aligns with the function name. Right now it performs a negation in the pref path, and returns false in the default case when it should return true(?). If it returns true it should return false in `CanZeroWindowRestartProceed`

    Would like to find a way to simplify this while we are here 👍

    Line 37, Patchset 11 (Latest): // If the policy is unset, default to true (allow relaunch).
    Darryl James . unresolved

    Does this comment need to be updated or does the return value need to change?

    Line 95, Patchset 11 (Parent): if (policy::ManagementServiceFactory::GetForPlatform()->IsManaged()) {
    Darryl James . unresolved

    Should this logic be kept in some form within `IsZeroWindowBlockedByEnterprisePolicy` (maybe as the final return value)? Or is this behavior change intentional?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alexander Hendrich
    • Victor Tan
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
      Gerrit-Change-Number: 8031982
      Gerrit-PatchSet: 11
      Gerrit-Owner: Victor Tan <vict...@chromium.org>
      Gerrit-Reviewer: Alexander Hendrich <hend...@chromium.org>
      Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
      Gerrit-Reviewer: Mike Taylor <mike...@chromium.org>
      Gerrit-Reviewer: Victor Tan <vict...@chromium.org>
      Gerrit-CC: Brandon Seils <bse...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-CC: gwsq
      Gerrit-Attention: Alexander Hendrich <hend...@chromium.org>
      Gerrit-Attention: Victor Tan <vict...@chromium.org>
      Gerrit-Comment-Date: Wed, 08 Jul 2026 18:20:12 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Victor Tan (Gerrit)

      unread,
      Jul 8, 2026, 2:49:16 PM (23 hours ago) Jul 8
      to Mike Taylor, Enterprise Policy Reviews, Alexander Hendrich, Darryl James, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org
      Attention needed from Alexander Hendrich and Darryl James

      Victor Tan added 4 comments

      File chrome/browser/lifetime/smart_restart_manager_browsertest.cc
      Line 200, Patchset 11 (Parent): histogram_tester.ExpectTotalCount(
      "Session.SmartRestart.ZeroWindow.ExecutionOutcome", 0);
      Darryl James . resolved

      Should this expectation be preserved in the updated test?

      Victor Tan

      Done. add verify metrics that zero-window restart is allowed by default when managed.

      File chrome/browser/lifetime/smart_restart_policy.cc
      Line 29, Patchset 11:bool IsZeroWindowBlockedByEnterprisePolicy() {
      Darryl James . resolved

      Can this be renamed to something like `SupportsZeroWindowRestarts` or similar? This way the implementation aligns with the function name. Right now it performs a negation in the pref path, and returns false in the default case when it should return true(?). If it returns true it should return false in `CanZeroWindowRestartProceed`

      Would like to find a way to simplify this while we are here 👍

      Victor Tan

      Done. renamed to `IsZeroWindowRestartAllowedByPolicy` and simplified to return true by default.

      Line 37, Patchset 11: // If the policy is unset, default to true (allow relaunch).
      Darryl James . resolved

      Does this comment need to be updated or does the return value need to change?

      Victor Tan

      update the return values

      Line 95, Patchset 11 (Parent): if (policy::ManagementServiceFactory::GetForPlatform()->IsManaged()) {
      Darryl James . resolved

      Should this logic be kept in some form within `IsZeroWindowBlockedByEnterprisePolicy` (maybe as the final return value)? Or is this behavior change intentional?

      Victor Tan

      yea, confirm with the team, they would like to keep the enterprise policy default as true (which is allow to restart) while disable the restart feature before m152 which is weird. :)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alexander Hendrich
      • Darryl James
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
        Gerrit-Change-Number: 8031982
        Gerrit-PatchSet: 12
        Gerrit-Owner: Victor Tan <vict...@chromium.org>
        Gerrit-Reviewer: Alexander Hendrich <hend...@chromium.org>
        Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
        Gerrit-Reviewer: Mike Taylor <mike...@chromium.org>
        Gerrit-Reviewer: Victor Tan <vict...@chromium.org>
        Gerrit-CC: Brandon Seils <bse...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Alexander Hendrich <hend...@chromium.org>
        Gerrit-Attention: Darryl James <dlj...@chromium.org>
        Gerrit-Comment-Date: Wed, 08 Jul 2026 18:49:03 +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,
        Jul 8, 2026, 5:34:44 PM (20 hours ago) Jul 8
        to Victor Tan, Mike Taylor, Enterprise Policy Reviews, Alexander Hendrich, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org
        Attention needed from Alexander Hendrich and Victor Tan

        Darryl James voted and added 1 comment

        Votes added by Darryl James

        Code-Review+1

        1 comment

        Patchset-level comments
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Alexander Hendrich
        • Victor Tan
        Gerrit-Attention: Victor Tan <vict...@chromium.org>
        Gerrit-Comment-Date: Wed, 08 Jul 2026 21:34:34 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Alexander Hendrich (Gerrit)

        unread,
        10:31 AM (3 hours ago) 10:31 AM
        to Victor Tan, Darryl James, Mike Taylor, Enterprise Policy Reviews, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org
        Attention needed from Victor Tan

        Alexander Hendrich voted and added 2 comments

        Votes added by Alexander Hendrich

        Code-Review+1

        2 comments

        Patchset-level comments
        Alexander Hendrich . resolved

        lgtm

        File components/policy/resources/templates/policies.yaml
        Line 1472, Patchset 12 (Latest): 1471: UpdateOnZeroWindowEnabled
        Alexander Hendrich . unresolved

        just double checking: shouldn't this be called `UpdateOnZeroWindowsEnabled` (plural for "windows")? The code also seems to be using the singular form

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Victor Tan
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
        Gerrit-Change-Number: 8031982
        Gerrit-PatchSet: 12
        Gerrit-Owner: Victor Tan <vict...@chromium.org>
        Gerrit-Reviewer: Alexander Hendrich <hend...@chromium.org>
        Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
        Gerrit-Reviewer: Mike Taylor <mike...@chromium.org>
        Gerrit-Reviewer: Victor Tan <vict...@chromium.org>
        Gerrit-CC: Brandon Seils <bse...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Victor Tan <vict...@chromium.org>
        Gerrit-Comment-Date: Thu, 09 Jul 2026 14:31:13 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Victor Tan (Gerrit)

        unread,
        10:38 AM (3 hours ago) 10:38 AM
        to Alexander Hendrich, Darryl James, Mike Taylor, Enterprise Policy Reviews, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org

        Victor Tan added 1 comment

        File components/policy/resources/templates/policies.yaml
        Line 1472, Patchset 12 (Latest): 1471: UpdateOnZeroWindowEnabled
        Alexander Hendrich . resolved

        just double checking: shouldn't this be called `UpdateOnZeroWindowsEnabled` (plural for "windows")? The code also seems to be using the singular form

        Victor Tan

        Let's keep the singular form (ZeroWindow). It follows the pattern (similar to "zero-day vulnerability" or "zero-click attack"). This also maintains consistency with existing Chromium internal naming and UMA metrics(e.g., `CanZeroWindowRestartProceed()`, `Session.SmartRestart.ZeroWindow.*` ).

        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: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
          Gerrit-Change-Number: 8031982
          Gerrit-PatchSet: 12
          Gerrit-Owner: Victor Tan <vict...@chromium.org>
          Gerrit-Reviewer: Alexander Hendrich <hend...@chromium.org>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Mike Taylor <mike...@chromium.org>
          Gerrit-Reviewer: Victor Tan <vict...@chromium.org>
          Gerrit-CC: Brandon Seils <bse...@google.com>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
          Gerrit-CC: gwsq
          Gerrit-Comment-Date: Thu, 09 Jul 2026 14:37:53 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Alexander Hendrich <hend...@chromium.org>
          satisfied_requirement
          open
          diffy

          Victor Tan (Gerrit)

          unread,
          10:38 AM (3 hours ago) 10:38 AM
          to Alexander Hendrich, Darryl James, Mike Taylor, Enterprise Policy Reviews, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org

          Victor Tan voted Commit-Queue+2

          Commit-Queue+2
          Gerrit-Comment-Date: Thu, 09 Jul 2026 14:38:42 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Victor Tan (Gerrit)

          unread,
          12:07 PM (1 hour ago) 12:07 PM
          to Alexander Hendrich, Darryl James, Mike Taylor, Enterprise Policy Reviews, Chromium LUCI CQ, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org
          Gerrit-Comment-Date: Thu, 09 Jul 2026 16:07:23 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          1:03 PM (1 hour ago) 1:03 PM
          to Victor Tan, Alexander Hendrich, Darryl James, Mike Taylor, Enterprise Policy Reviews, Brandon Seils, Chromium Metrics Reviews, chromium...@chromium.org, asvitkine...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          [SmartRestart] Add UpdateOnZeroWindowEnabled enterprise policy

          Add the UpdateOnZeroWindowEnabled boolean policy to control restarts
          when all browser windows are closed on macOS.

          This allows explicitly enabling or disabling automatic restart for
          updates when no windows are open. By default (if the policy is
          unconfigured), zero-window restarts are allowed.
          Bug: 503371806
          Change-Id: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
          Reviewed-by: Alexander Hendrich <hend...@chromium.org>
          Commit-Queue: Victor Tan <vict...@chromium.org>
          Reviewed-by: Mike Taylor <mike...@chromium.org>
          Reviewed-by: Darryl James <dlj...@chromium.org>
          Cr-Commit-Position: refs/heads/main@{#1659653}
          Files:
          • M chrome/browser/lifetime/BUILD.gn
          • M chrome/browser/lifetime/smart_restart_manager_browsertest.cc
          • M chrome/browser/lifetime/smart_restart_policy.cc
          • M chrome/browser/lifetime/smart_restart_policy_unittest.cc
          • M chrome/browser/policy/configuration_policy_handler_list_factory.cc
          • M chrome/browser/prefs/browser_prefs.cc
          • M chrome/common/pref_names.h
          • M components/policy/resources/templates/policies.yaml
          • A components/policy/resources/templates/policy_definitions/Miscellaneous/UpdateOnZeroWindowEnabled.yaml
          • A components/policy/test/data/pref_mapping/UpdateOnZeroWindowEnabled.json
          • M tools/metrics/histograms/metadata/enterprise/enums.xml
          Change size: L
          Delta: 11 files changed, 290 insertions(+), 24 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Alexander Hendrich, +1 by Mike Taylor, +1 by Darryl James
          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: Ic9f4f5939ff18e4a4809ec133e44259e630d8434
          Gerrit-Change-Number: 8031982
          Gerrit-PatchSet: 13
          Gerrit-Owner: Victor Tan <vict...@chromium.org>
          Gerrit-Reviewer: Alexander Hendrich <hend...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Darryl James <dlj...@chromium.org>
          Gerrit-Reviewer: Mike Taylor <mike...@chromium.org>
          Gerrit-Reviewer: Victor Tan <vict...@chromium.org>
          Gerrit-CC: Brandon Seils <bse...@google.com>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages