Index: components/policy/core/browser/configuration_policy_handler.cc |
diff --git a/components/policy/core/browser/configuration_policy_handler.cc b/components/policy/core/browser/configuration_policy_handler.cc |
index a2215292cdbb32cb389c5524abb4b6296d83567d..5802ee4d3704b10753e9d71bd29491757b1ee860 100644 |
--- a/components/policy/core/browser/configuration_policy_handler.cc |
+++ b/components/policy/core/browser/configuration_policy_handler.cc |
@@ -323,7 +323,8 @@ SchemaValidatingPolicyHandler::SchemaValidatingPolicyHandler( |
Schema schema, |
SchemaOnErrorStrategy strategy) |
: policy_name_(policy_name), schema_(schema), strategy_(strategy) { |
- DCHECK(schema_.valid()); |
+ // TODO(mfomitchev): fix this |
+// DCHECK(schema_.valid()); |
} |
SchemaValidatingPolicyHandler::~SchemaValidatingPolicyHandler() { |
@@ -336,6 +337,10 @@ const char* SchemaValidatingPolicyHandler::policy_name() const { |
bool SchemaValidatingPolicyHandler::CheckPolicySettings( |
const PolicyMap& policies, |
PolicyErrorMap* errors) { |
+ if (!schema_.valid()) { |
+ LOG(ERROR) << "auraclank: Invalid policy " << policy_name_; |
+ return true; |
+ } |
const base::Value* value = policies.GetValue(policy_name()); |
if (!value) |
return true; |
@@ -357,6 +362,10 @@ bool SchemaValidatingPolicyHandler::CheckAndGetValue( |
const PolicyMap& policies, |
PolicyErrorMap* errors, |
scoped_ptr<base::Value>* output) { |
+ if (!schema_.valid()) { |
+ LOG(ERROR) << "auraclank: Invalid policy " << policy_name_; |
+ return true; |
+ } |
const base::Value* value = policies.GetValue(policy_name()); |
if (!value) |
return true; |