| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/policy/url_blacklist_policy_handler.h" | 5 #include "chrome/browser/policy/url_blacklist_policy_handler.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/prefs/pref_value_map.h" | 8 #include "base/prefs/pref_value_map.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/policy/policy_error_map.h" | 10 #include "chrome/browser/policy/policy_error_map.h" |
| 11 #include "chrome/browser/policy/policy_map.h" | |
| 12 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "components/policy/core/common/policy_map.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 #include "policy/policy_constants.h" | 14 #include "policy/policy_constants.h" |
| 15 | 15 |
| 16 namespace policy { | 16 namespace policy { |
| 17 | 17 |
| 18 URLBlacklistPolicyHandler::URLBlacklistPolicyHandler() {} | 18 URLBlacklistPolicyHandler::URLBlacklistPolicyHandler() {} |
| 19 | 19 |
| 20 URLBlacklistPolicyHandler::~URLBlacklistPolicyHandler() {} | 20 URLBlacklistPolicyHandler::~URLBlacklistPolicyHandler() {} |
| 21 | 21 |
| 22 bool URLBlacklistPolicyHandler::CheckPolicySettings(const PolicyMap& policies, | 22 bool URLBlacklistPolicyHandler::CheckPolicySettings(const PolicyMap& policies, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if ((*entry)->IsType(Value::TYPE_STRING)) | 74 if ((*entry)->IsType(Value::TYPE_STRING)) |
| 75 merged_url_blacklist->Append((*entry)->DeepCopy()); | 75 merged_url_blacklist->Append((*entry)->DeepCopy()); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 if (disabled_schemes || url_blacklist) | 79 if (disabled_schemes || url_blacklist) |
| 80 prefs->SetValue(prefs::kUrlBlacklist, merged_url_blacklist.release()); | 80 prefs->SetValue(prefs::kUrlBlacklist, merged_url_blacklist.release()); |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace policy | 83 } // namespace policy |
| OLD | NEW |