| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/policy/core/browser/configuration_policy_handler.h" | 5 #include "components/policy/core/browser/configuration_policy_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 PolicyErrorMap* errors, | 338 PolicyErrorMap* errors, |
| 339 scoped_ptr<base::Value>* output) { | 339 scoped_ptr<base::Value>* output) { |
| 340 const base::Value* value = policies.GetValue(policy_name()); | 340 const base::Value* value = policies.GetValue(policy_name()); |
| 341 if (!value) | 341 if (!value) |
| 342 return true; | 342 return true; |
| 343 | 343 |
| 344 output->reset(value->DeepCopy()); | 344 output->reset(value->DeepCopy()); |
| 345 std::string error_path; | 345 std::string error_path; |
| 346 std::string error; | 346 std::string error; |
| 347 bool result = | 347 bool result = |
| 348 schema_.Normalize(output->get(), strategy_, &error_path, &error); | 348 schema_.Normalize(output->get(), strategy_, &error_path, &error, NULL); |
| 349 | 349 |
| 350 if (errors && !error.empty()) { | 350 if (errors && !error.empty()) { |
| 351 if (error_path.empty()) | 351 if (error_path.empty()) |
| 352 error_path = "(ROOT)"; | 352 error_path = "(ROOT)"; |
| 353 errors->AddError(policy_name_, error_path, error); | 353 errors->AddError(policy_name_, error_path, error); |
| 354 } | 354 } |
| 355 | 355 |
| 356 return result; | 356 return result; |
| 357 } | 357 } |
| 358 | 358 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 for (handler = legacy_policy_handlers_.begin(); | 404 for (handler = legacy_policy_handlers_.begin(); |
| 405 handler != legacy_policy_handlers_.end(); | 405 handler != legacy_policy_handlers_.end(); |
| 406 ++handler) { | 406 ++handler) { |
| 407 if ((*handler)->CheckPolicySettings(policies, &scoped_errors)) | 407 if ((*handler)->CheckPolicySettings(policies, &scoped_errors)) |
| 408 (*handler)->ApplyPolicySettings(policies, prefs); | 408 (*handler)->ApplyPolicySettings(policies, prefs); |
| 409 } | 409 } |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 | 412 |
| 413 } // namespace policy | 413 } // namespace policy |
| OLD | NEW |