Commit 00c295ea authored by Anna Malova's avatar Anna Malova Committed by Commit Bot

[aw] Fix "Unknown Policy" message error.

The message does not indicate an error, but it causes confusion.
The message appears when GetChromePolicyDetailsCallback
returns null for the policy
(see ConfigurationPolicyHandlerList::FilterOutUnsupportedPolicies).

Use an empty callback instead.

Bug: 1098245
Change-Id: Ifcf43a40ebae5bfd300721bcd69310ba3ebc0914
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2292523Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Anna Malova <amalova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787828}
parent cc270077
......@@ -11,6 +11,7 @@
#include "components/policy/core/browser/android/android_combined_policy_provider.h"
#include "components/policy/core/browser/configuration_policy_handler_list.h"
#include "components/policy/core/browser/url_blacklist_policy_handler.h"
#include "components/policy/core/common/policy_details.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/policy/policy_constants.h"
#include "components/version_info/android/channel_getter.h"
......@@ -25,11 +26,6 @@ namespace {
void PopulatePolicyHandlerParameters(
policy::PolicyHandlerParameters* parameters) {}
// Used to check if a policy is deprecated. Currently bypasses that check.
const policy::PolicyDetails* GetChromePolicyDetails(const std::string& policy) {
return nullptr;
}
// Factory for the handlers that will be responsible for converting the policies
// to the associated preferences.
std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildHandlerList(
......@@ -38,7 +34,9 @@ std::unique_ptr<policy::ConfigurationPolicyHandlerList> BuildHandlerList(
std::unique_ptr<policy::ConfigurationPolicyHandlerList> handlers(
new policy::ConfigurationPolicyHandlerList(
base::BindRepeating(&PopulatePolicyHandlerParameters),
base::BindRepeating(&GetChromePolicyDetails),
// Used to check if a policy is deprecated. Currently bypasses that
// check.
policy::GetChromePolicyDetailsCallback(),
channel != version_info::Channel::STABLE &&
channel != version_info::Channel::BETA));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment