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

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

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/config_dir_policy_loader.h" 5 #include "components/policy/core/common/config_dir_policy_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 LOG(WARNING) << "3rdparty value is not a dictionary!"; 205 LOG(WARNING) << "3rdparty value is not a dictionary!";
206 return; 206 return;
207 } 207 }
208 208
209 // Helper to lookup a domain given its string name. 209 // Helper to lookup a domain given its string name.
210 std::map<std::string, PolicyDomain> supported_domains; 210 std::map<std::string, PolicyDomain> supported_domains;
211 supported_domains["extensions"] = POLICY_DOMAIN_EXTENSIONS; 211 supported_domains["extensions"] = POLICY_DOMAIN_EXTENSIONS;
212 212
213 for (base::DictionaryValue::Iterator domains_it(*domains_dictionary); 213 for (base::DictionaryValue::Iterator domains_it(*domains_dictionary);
214 !domains_it.IsAtEnd(); domains_it.Advance()) { 214 !domains_it.IsAtEnd(); domains_it.Advance()) {
215 if (!ContainsKey(supported_domains, domains_it.key())) { 215 if (!base::ContainsKey(supported_domains, domains_it.key())) {
216 LOG(WARNING) << "Unsupported 3rd party policy domain: " 216 LOG(WARNING) << "Unsupported 3rd party policy domain: "
217 << domains_it.key(); 217 << domains_it.key();
218 continue; 218 continue;
219 } 219 }
220 220
221 const base::DictionaryValue* components_dictionary; 221 const base::DictionaryValue* components_dictionary;
222 if (!domains_it.value().GetAsDictionary(&components_dictionary)) { 222 if (!domains_it.value().GetAsDictionary(&components_dictionary)) {
223 LOG(WARNING) << "3rdparty/" << domains_it.key() 223 LOG(WARNING) << "3rdparty/" << domains_it.key()
224 << " value is not a dictionary!"; 224 << " value is not a dictionary!";
225 continue; 225 continue;
(...skipping 17 matching lines...) Expand all
243 } 243 }
244 } 244 }
245 245
246 void ConfigDirPolicyLoader::OnFileUpdated(const base::FilePath& path, 246 void ConfigDirPolicyLoader::OnFileUpdated(const base::FilePath& path,
247 bool error) { 247 bool error) {
248 if (!error) 248 if (!error)
249 Reload(false); 249 Reload(false);
250 } 250 }
251 251
252 } // namespace policy 252 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/cloud/external_policy_data_updater.cc ('k') | components/policy/core/common/policy_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698