Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: components/policy/core/common/config_dir_policy_loader.cc

Issue 2414663002: Fix log spew for "_comment..." policies. (Closed)
Patch Set: Rename EraseGeneric() to FilterErase(). Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/config_dir_policy_loader.cc
diff --git a/components/policy/core/common/config_dir_policy_loader.cc b/components/policy/core/common/config_dir_policy_loader.cc
index d7313e83bf2687367b9c0797e78f943217ac33ba..76f9763ed9d73d6108a86500c42ab9a44063f97c 100644
--- a/components/policy/core/common/config_dir_policy_loader.cc
+++ b/components/policy/core/common/config_dir_policy_loader.cc
@@ -22,7 +22,6 @@
#include "components/policy/core/common/policy_bundle.h"
#include "components/policy/core/common/policy_load_status.h"
#include "components/policy/core/common/policy_types.h"
-#include "components/policy/policy_constants.h"
namespace policy {
@@ -59,20 +58,6 @@ PolicyLoadStatus JsonErrorToPolicyLoadStatus(int status) {
return POLICY_LOAD_STATUS_PARSE_ERROR;
}
-bool IsUserPolicy(const PolicyMap::const_iterator iter) {
- const PolicyDetails* policy_details = GetChromePolicyDetails(iter->first);
- if (!policy_details) {
- LOG(ERROR) << "Ignoring unknown platform policy: " << iter->first;
- return false;
- }
- if (policy_details->is_device_policy) {
- // Device Policy is only implemented as Cloud Policy (not Platform Policy).
- LOG(ERROR) << "Ignoring device platform policy: " << iter->first;
- return false;
- }
- return true;
-}
-
} // namespace
ConfigDirPolicyLoader::ConfigDirPolicyLoader(
@@ -186,7 +171,6 @@ void ConfigDirPolicyLoader::LoadFromPath(const base::FilePath& path,
PolicyMap policy_map;
policy_map.LoadFrom(dictionary_value, level, scope_,
POLICY_SOURCE_PLATFORM);
- policy_map.EraseNonmatching(base::Bind(&IsUserPolicy));
bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
.MergeFrom(policy_map);
}

Powered by Google App Engine
This is Rietveld 408576698