Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

fix direct and any reverse dependencies of default preferences

issue was found as SafeBrowsing is in a broken state (not fully disabled), closes e/backlog#8921 (closed)

Modify-default-preferences.patch relies on add-browser-policy.patch to enact default options set to false, otherwise they'd be toothless.

A second order effect is reverse dependencies from add-browser-policy.patch itself.

Unsure if it's fit for merging, but from the perspective of fidelity to upstream and how the patches rely on each other, this is what's needed. It'd be hard to break this into smaller parts

Description

To see what disabling options it does enact:

grep disabled_policies_list, build/cromite_patches/add-browser-policy.patch

+  AddPolicy(disabled_policies_list, policy_map, policy::key::kSafeBrowsingEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kSafeBrowsingExtendedReportingEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kScrollToTextFragmentEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kContextualSearchEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kEnableMediaRouter, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kUrlKeyedAnonymizedDataCollectionEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kTranslateEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kNetworkPredictionOptions,
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kBrowserSignin,
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kSigninAllowed, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kSyncDisabled, base::Value(true));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kMetricsReportingEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kShoppingListEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kGoogleSearchSidePanelEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kHttpsUpgradesEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kSideSearchEnabled, base::Value(false));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kExtensionManifestV2Availability, base::Value(/*Enabled*/ 2));
+  AddPolicy(disabled_policies_list, policy_map, policy::key::kDynamicCodeSettings, base::Value(/*DisabledForBrowser*/ 1));

for an approximation of reverse-dependencies of the policy patch file run:

for key in $(grep disabled_policies_list, build/cromite/build/patches/add-browser-policy.patch | cut -d ':' -f 5 | cut -d ',' -f1); do grep -r $key build/cromite/build/patches/ ; done | grep '^build' | cut -d ':' -f1 | sort | uniq

build/cromite/build/patches/add-browser-policy.patch
build/cromite/build/patches/Disable-media-router-and-remoting-by-default.patch
build/cromite/build/patches/Disable-text-fragments-by-default.patch
build/cromite/build/patches/Disable-various-metrics.patch
build/cromite/build/patches/Keep-Side-Panel-Companion-disabled.patch
build/cromite/build/patches/Modify-default-preferences.patch
build/cromite/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch
build/cromite/build/patches/ungoogled-chromium-no-special-hosts-domains.patch
build/cromite/build/patches/User-agent-customization.patch

and as comparison to the whitelist:

for key in $(grep disabled_policies_list, build/cromite/build/patches/add-browser-policy.patch | cut -d ':' -f 5 | cut -d ',' -f1); do grep -r $key build/cromite_patches/ ; done | grep '^build' | cut -d ':' -f1 | sort | uniq

resulting in Keep-Side-Panel-Companion-disabled.patch as the only difference prior to inclusion in this MR - those patches weren't enacted either.

Cromite seems a pretty hard to manage fork with a subset of patches of when they aren't sliced per-feature.

Edited by tcecyk

Merge request reports

Loading