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

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

Issue 108513011: Move chrome/app/policy into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « components/policy/core/common/policy_map.h ('k') | components/policy/resources/OWNERS » ('j') | 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/stl_util.h" 10 #include "base/stl_util.h"
11 11
12 namespace policy { 12 namespace policy {
13 13
14 PolicyMap::Entry::Entry()
15 : level(POLICY_LEVEL_RECOMMENDED),
16 scope(POLICY_SCOPE_USER),
17 value(NULL),
18 external_data_fetcher(NULL) {}
19
14 void PolicyMap::Entry::DeleteOwnedMembers() { 20 void PolicyMap::Entry::DeleteOwnedMembers() {
15 delete value; 21 delete value;
16 value = NULL; 22 value = NULL;
17 delete external_data_fetcher; 23 delete external_data_fetcher;
18 external_data_fetcher = NULL; 24 external_data_fetcher = NULL;
19 } 25 }
20 26
21 scoped_ptr<PolicyMap::Entry> PolicyMap::Entry::DeepCopy() const { 27 scoped_ptr<PolicyMap::Entry> PolicyMap::Entry::DeepCopy() const {
22 scoped_ptr<Entry> copy(new Entry); 28 scoped_ptr<Entry> copy(new Entry);
23 copy->level = level; 29 copy->level = level;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 map_.clear(); 198 map_.clear();
193 } 199 }
194 200
195 // static 201 // static
196 bool PolicyMap::MapEntryEquals(const PolicyMap::PolicyMapType::value_type& a, 202 bool PolicyMap::MapEntryEquals(const PolicyMap::PolicyMapType::value_type& a,
197 const PolicyMap::PolicyMapType::value_type& b) { 203 const PolicyMap::PolicyMapType::value_type& b) {
198 return a.first == b.first && a.second.Equals(b.second); 204 return a.first == b.first && a.second.Equals(b.second);
199 } 205 }
200 206
201 } // namespace policy 207 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/policy_map.h ('k') | components/policy/resources/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698