| 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 "components/policy/core/common/policy_map.h" | 5 #include "components/policy/core/common/policy_map.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 | 12 |
| 13 namespace policy { | 13 namespace policy { |
| 14 | 14 |
| 15 PolicyMap::Entry::Entry() | 15 PolicyMap::Entry::Entry() = default; |
| 16 : level(POLICY_LEVEL_RECOMMENDED), scope(POLICY_SCOPE_USER) {} | |
| 17 | 16 |
| 18 PolicyMap::Entry::~Entry() = default; | 17 PolicyMap::Entry::~Entry() = default; |
| 19 | 18 |
| 20 PolicyMap::Entry::Entry(Entry&&) = default; | 19 PolicyMap::Entry::Entry(Entry&&) = default; |
| 21 | 20 |
| 22 PolicyMap::Entry& PolicyMap::Entry::operator=(Entry&&) = default; | 21 PolicyMap::Entry& PolicyMap::Entry::operator=(Entry&&) = default; |
| 23 | 22 |
| 24 PolicyMap::Entry PolicyMap::Entry::DeepCopy() const { | 23 PolicyMap::Entry PolicyMap::Entry::DeepCopy() const { |
| 25 Entry copy; | 24 Entry copy; |
| 26 copy.level = level; | 25 copy.level = level; |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 while (iter != map_.end()) { | 212 while (iter != map_.end()) { |
| 214 if (filter.Run(iter) == deletion_value) { | 213 if (filter.Run(iter) == deletion_value) { |
| 215 map_.erase(iter++); | 214 map_.erase(iter++); |
| 216 } else { | 215 } else { |
| 217 ++iter; | 216 ++iter; |
| 218 } | 217 } |
| 219 } | 218 } |
| 220 } | 219 } |
| 221 | 220 |
| 222 } // namespace policy | 221 } // namespace policy |
| OLD | NEW |