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

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

Issue 2724763002: Initialize source field of PolicyMap::Entry (Closed)
Patch Set: 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 | « no previous file | 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()
16 : level(POLICY_LEVEL_RECOMMENDED), scope(POLICY_SCOPE_USER) {} 16 : level(POLICY_LEVEL_RECOMMENDED),
17 scope(POLICY_SCOPE_USER),
18 source(POLICY_SOURCE_ENTERPRISE_DEFAULT) {}
Thiemo Nagel 2017/03/01 14:21:27 Please move initialization to .h file.
Marton Hunyady 2017/03/01 14:37:42 Done, did you mean this?
17 19
18 PolicyMap::Entry::~Entry() = default; 20 PolicyMap::Entry::~Entry() = default;
19 21
20 PolicyMap::Entry::Entry(Entry&&) = default; 22 PolicyMap::Entry::Entry(Entry&&) = default;
21 23
22 PolicyMap::Entry& PolicyMap::Entry::operator=(Entry&&) = default; 24 PolicyMap::Entry& PolicyMap::Entry::operator=(Entry&&) = default;
23 25
24 PolicyMap::Entry PolicyMap::Entry::DeepCopy() const { 26 PolicyMap::Entry PolicyMap::Entry::DeepCopy() const {
25 Entry copy; 27 Entry copy;
26 copy.level = level; 28 copy.level = level;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 while (iter != map_.end()) { 215 while (iter != map_.end()) {
214 if (filter.Run(iter) == deletion_value) { 216 if (filter.Run(iter) == deletion_value) {
215 map_.erase(iter++); 217 map_.erase(iter++);
216 } else { 218 } else {
217 ++iter; 219 ++iter;
218 } 220 }
219 } 221 }
220 } 222 }
221 223
222 } // namespace policy 224 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698