| Commit-Queue | +2 |
Fix bug where no policies are fetched when extension install policies are active and reactivate policy verificationYann DagoCan the summarize line be shortened?
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
21 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/policy/cloud/extension_install_policy_service.cc
Insertions: 3, Deletions: 1.
@@ -148,7 +148,9 @@
return;
}
client_observation_.Reset();
- std::move(callback_).Run(&manager_.get());
+ if (callback_) {
+ std::move(callback_).Run(&manager_.get());
+ }
}
CloudPolicyManager* GetManager() const { return &manager_.get(); }
```
```
The name of the file: components/policy/core/common/cloud/cloud_policy_manager.h
Insertions: 0, Deletions: 2.
@@ -170,8 +170,6 @@
std::unique_ptr<ComponentCloudPolicyService> component_policy_service_;
base::ScopedObservation<CloudPolicyStore, CloudPolicyStore::Observer>
- store_observation_{this};
- base::ScopedObservation<CloudPolicyStore, CloudPolicyStore::Observer>
extension_install_store_observation_{this};
// Has component policy ever been published.
```
```
The name of the file: components/policy/core/common/cloud/cloud_policy_manager.cc
Insertions: 2, Deletions: 2.
@@ -130,7 +130,7 @@
void CloudPolicyManager::Init(SchemaRegistry* registry) {
ConfigurationPolicyProvider::Init(registry);
- store_observation_.Observe(store());
+ store()->AddObserver(this);
// If the underlying store is already initialized, pretend it was loaded now.
// Note: It is not enough to just copy OnStoreLoaded's contents here because
@@ -144,7 +144,7 @@
void CloudPolicyManager::Shutdown() {
component_policy_service_.reset();
core_.Disconnect();
- store_observation_.Reset();
+ store()->RemoveObserver(this);
if (extension_install_core_) {
extension_install_core_->Disconnect();
}
```
Fix no policies are fetched when extension install policies are active
The server does not allow fetching 2 primary policy types in the same
request. This warrant a refactor on the client side to separate the
fetching of all policy types.
This change refactors how extension install policies are managed.
Instead of having a single CloudPolicyCore and therefore a single
CloudPolicy?Client handle both the main policy and the extension install
policy, a separate CloudPolicyCore instance is created within
CloudPolicyManager specifically for extension install policies.
The new extension install core is initialized by
ExtensionInstallPolicyServiceImpl only after the main
CloudPolicyManager's client is registered. This allows for better
isolation and on-demand initialization of the extension install policy
fetching mechanism.
Signature verification for extension install policies is also
re-enabled, as the separate core structure addresses the previous
issues.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |