Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Side by Side Diff: components/policy/core/common/policy_map.cc

Issue 2724763002: Initialize source field of PolicyMap::Entry (Closed)
Patch Set: Move default values to header file. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/policy/core/common/policy_map.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_map.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698