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 "components/policy/core/browser/policy_error_map.h" | 10 #include "components/policy/core/browser/policy_error_map.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 if ((*entry)->GetAsString(&entry_value)) { | 64 if ((*entry)->GetAsString(&entry_value)) { |
65 entry_value.append("://*"); | 65 entry_value.append("://*"); |
66 merged_url_blacklist->AppendString(entry_value); | 66 merged_url_blacklist->AppendString(entry_value); |
67 } | 67 } |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 if (url_blacklist) { | 71 if (url_blacklist) { |
72 for (base::ListValue::const_iterator entry(url_blacklist->begin()); | 72 for (base::ListValue::const_iterator entry(url_blacklist->begin()); |
73 entry != url_blacklist->end(); ++entry) { | 73 entry != url_blacklist->end(); ++entry) { |
74 if ((*entry)->IsType(Value::TYPE_STRING)) | 74 if ((*entry)->IsType(base::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(policy_prefs::kUrlBlacklist, | 80 prefs->SetValue(policy_prefs::kUrlBlacklist, |
81 merged_url_blacklist.release()); | 81 merged_url_blacklist.release()); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 } // namespace policy | 85 } // namespace policy |
OLD | NEW |