Reviewer source(s):
hend...@chromium.org is from context(chrome/enterprise/gwsq/enterprise-policy-review.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
components/policy/resources/templates/policy_definitions/Miscellaneous/UpdateOnZeroWindowEnabled.yaml LGTM
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Shape looks good; small asks 👍; thanks!
histogram_tester.ExpectTotalCount(
"Session.SmartRestart.ZeroWindow.ExecutionOutcome", 0);Should this expectation be preserved in the updated test?
bool IsZeroWindowBlockedByEnterprisePolicy() {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 👍
// If the policy is unset, default to true (allow relaunch).Does this comment need to be updated or does the return value need to change?
if (policy::ManagementServiceFactory::GetForPlatform()->IsManaged()) {Should this logic be kept in some form within `IsZeroWindowBlockedByEnterprisePolicy` (maybe as the final return value)? Or is this behavior change intentional?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
histogram_tester.ExpectTotalCount(
"Session.SmartRestart.ZeroWindow.ExecutionOutcome", 0);Should this expectation be preserved in the updated test?
Done. add verify metrics that zero-window restart is allowed by default when managed.
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 👍
Done. renamed to `IsZeroWindowRestartAllowedByPolicy` and simplified to return true by default.
// If the policy is unset, default to true (allow relaunch).Does this comment need to be updated or does the return value need to change?
update the return values
if (policy::ManagementServiceFactory::GetForPlatform()->IsManaged()) {Should this logic be kept in some form within `IsZeroWindowBlockedByEnterprisePolicy` (maybe as the final return value)? Or is this behavior change intentional?
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. :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Code-Review | +1 |
lgtm
1471: UpdateOnZeroWindowEnabledjust double checking: shouldn't this be called `UpdateOnZeroWindowsEnabled` (plural for "windows")? The code also seems to be using the singular form
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1471: UpdateOnZeroWindowEnabledjust double checking: shouldn't this be called `UpdateOnZeroWindowsEnabled` (plural for "windows")? The code also seems to be using the singular form
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.*` ).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |