Replace GPOs with CBCM for local content analysis.
Bug: b:257248802
Change-Id: I97c89d925a372c50f67df4b83362a9279afe5410
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4067361
Commit-Queue: Roger Tawa <[email protected]>
Reviewed-by: Dominique Fauteux-Chapleau <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1109556}
diff --git a/chrome/browser/enterprise/connectors/connectors_manager.h b/chrome/browser/enterprise/connectors/connectors_manager.h
index 91bba9f..5072a5287 100644
--- a/chrome/browser/enterprise/connectors/connectors_manager.h
+++ b/chrome/browser/enterprise/connectors/connectors_manager.h
@@ -97,7 +97,7 @@
AnalysisConnector connector);
// Read and cache the policy corresponding to |connector|.
- void CacheAnalysisConnectorPolicy(AnalysisConnector connector);
+ void CacheAnalysisConnectorPolicy(AnalysisConnector connector) const;
void CacheReportingConnectorPolicy(ReportingConnector connector);
// Sets up |pref_change_registrar_|. Used by the constructor and
@@ -112,13 +112,19 @@
absl::optional<ReportingSettings> GetReportingSettingsFromConnectorPolicy(
ReportingConnector connector);
+ PrefService* prefs() { return pref_change_registrar_.prefs(); }
+
+ const PrefService* prefs() const { return pref_change_registrar_.prefs(); }
+
// Cached values of available service providers. This information validates
// the Connector policies have a valid provider.
raw_ptr<const ServiceProviderConfig> service_provider_config_;
// Cached values of the connector policies. Updated when a connector is first
- // used or when a policy is updated.
- AnalysisConnectorsSettings analysis_connector_settings_;
+ // used or when a policy is updated. Analysis connectors settings are
+ // mutable because they maybe updated by a call to IsConnectorEnabled(),
+ // which is a const method.
+ mutable AnalysisConnectorsSettings analysis_connector_settings_;
ReportingConnectorsSettings reporting_connector_settings_;
// Used to track changes of connector policies and propagate them in