[ContextualTask] adding rules to deprecate lensOverlaySettings with SearchContentSharing policy [chromium/src : main]

0 views
Skip to first unread message

Min Qin (Gerrit)

unread,
Dec 15, 2025, 3:32:00 AM (yesterday) Dec 15
to Owen Min, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews, eic+...@google.com, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Owen Min

Min Qin added 1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Owen Min
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: I8a56e925edd9545d42bcfb23fc8ce5111997c0b6
Gerrit-Change-Number: 7259325
Gerrit-PatchSet: 3
Gerrit-Owner: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Min Qin <qin...@chromium.org>
Gerrit-Reviewer: Owen Min <zm...@chromium.org>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-Attention: Owen Min <zm...@chromium.org>
Gerrit-Comment-Date: Mon, 15 Dec 2025 08:31:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Owen Min (Gerrit)

unread,
Dec 15, 2025, 2:58:51 PM (19 hours ago) Dec 15
to Min Qin, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews, eic+...@google.com, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org
Attention needed from Min Qin

Owen Min added 6 comments

File chrome/browser/policy/configuration_policy_handler_list_factory.cc
Line 3522, Patchset 3 (Latest): key::kAIModeSettings);
Owen Min . unresolved

`SearchContentSharingSettings`

File components/policy/core/browser/gen_ai_default_settings_policy_handler.cc
Line 144, Patchset 3 (Latest): CHECK(legacy_details) << "legacy policy details cannot be found.";
Owen Min . unresolved

I agree that legacy policy name should be in the `gen_ai_policies` list.

However, new policies don't have to. And they don't need to share the exact same pref map. For legacy policy, all it needs is that if itself nor the new policy is set, use the default value.

Line 145, Patchset 3 (Latest): CHECK(new_details) << "new policy details cannot be found.";
Owen Min . unresolved

Follow up of comments above.

Given that we only care about that legacy policy names should be in the `gen_ai_policies` . I suggested to expand `GenAiPolicyDetails` instead of creating the `DeprecatingPolicyDetailsInfo`.

For example:

```
struct POLICY_EXPORT GenAiPolicyDetails {
...
std::string name;
std::string pref_path;
// Another policy that can also set `pref_path` and has higher priority.
std::string overriden_name
```
Line 215, Patchset 3 (Latest): for (const auto& info : deprecating_policy_details_info_) {
Owen Min . unresolved

If `GenAIDefaultSettings` doesn't control a legacy policy value because the associated new policy is set. We should remove the legacy policy name from the string list above (line 208-210).

While the deprecation message should belong to the legacy policy itself not `GenAIDefaultSettings`. And deprecation message should be generated use `SimpleDeprecatingPolicyHandler` between legacy/new policy.

The policy handler here should focus on applying the default value.

Line 246, Patchset 3 (Latest): std::optional<GenAiPolicyDetails> effective_policy_details =
Owen Min . unresolved

This is a bit overcomplicated.

`GenAiDefaultSettingsPolicyHandler` handles the case when policies are not set and it should only focus on this case.

For the cases the either the legacy or new policy is set. It should be resolved by the legacy policy handler but not here.

Line 260, Patchset 3 (Latest): GetValueToApply(*effective_policy_details, policies, default_int_value);
Owen Min . unresolved

`GetValueToApply` is the key function for the policy handler here. What it does is
1) If policy is set, return `null_ptr`
2) If policy is not set, get the default value.
3) Convert default value based on `pref_map` if exists.
4) Return default value.


And what we want is expand the first step.
1) If policy is set, return `null_ptr`
2) If new policy is set, return `null_ptr`

All rest can be skipped.

Open in Gerrit

Related details

Attention is currently required from:
  • Min Qin
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: I8a56e925edd9545d42bcfb23fc8ce5111997c0b6
    Gerrit-Change-Number: 7259325
    Gerrit-PatchSet: 3
    Gerrit-Owner: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Min Qin <qin...@chromium.org>
    Gerrit-Reviewer: Owen Min <zm...@chromium.org>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-Attention: Min Qin <qin...@chromium.org>
    Gerrit-Comment-Date: Mon, 15 Dec 2025 19:58:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages