| Index: chrome/browser/policy/cloud/user_cloud_policy_manager.cc
|
| diff --git a/chrome/browser/policy/cloud/user_cloud_policy_manager.cc b/chrome/browser/policy/cloud/user_cloud_policy_manager.cc
|
| index e74a931097a42b86ba52e952bce7da7e3805c2e9..77e3adae0d3b4a638fe250b32c92748a487d25b9 100644
|
| --- a/chrome/browser/policy/cloud/user_cloud_policy_manager.cc
|
| +++ b/chrome/browser/policy/cloud/user_cloud_policy_manager.cc
|
| @@ -66,6 +66,7 @@ void UserCloudPolicyManager::Connect(
|
| policy_prefs::kUserPolicyRefreshRate);
|
| if (external_data_manager_)
|
| external_data_manager_->Connect(request_context);
|
| +
|
| CreateComponentCloudPolicyService(component_policy_cache_path_,
|
| request_context);
|
| }
|
| @@ -89,6 +90,12 @@ void UserCloudPolicyManager::DisconnectAndRemovePolicy() {
|
| if (external_data_manager_)
|
| external_data_manager_->Disconnect();
|
| core()->Disconnect();
|
| +
|
| + // store_->Clear() will publish the updated, empty policy. The component
|
| + // policy service must be cleared before OnStoreLoaded() is issued, so that
|
| + // component policies are also empty at CheckAndPublishPolicy().
|
| + ClearAndDestroyComponentCloudPolicyService();
|
| +
|
| // When the |store_| is cleared, it informs the |external_data_manager_| that
|
| // all external data references have been removed, causing the
|
| // |external_data_manager_| to clear its cache as well.
|
|
|