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

Unified Diff: chrome/browser/policy/policy_domain_descriptor.cc

Issue 22645011: policy: use JSON schema to deserialize entries from Windows registry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 3rd party policy unit tests Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/policy_domain_descriptor.h ('k') | chrome/browser/policy/policy_loader_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/policy_domain_descriptor.cc
diff --git a/chrome/browser/policy/policy_domain_descriptor.cc b/chrome/browser/policy/policy_domain_descriptor.cc
index 38327de95ab46fb0d41c022d036e336c64286b1b..cec7f4b81cb7dd8542dd84fba685a6d5e44c06b6 100644
--- a/chrome/browser/policy/policy_domain_descriptor.cc
+++ b/chrome/browser/policy/policy_domain_descriptor.cc
@@ -48,6 +48,14 @@ bool Matches(const PolicySchema* schema, const base::Value& value) {
PolicyDomainDescriptor::PolicyDomainDescriptor(PolicyDomain domain)
: domain_(domain) {}
+const PolicySchema* PolicyDomainDescriptor::get_schema(
+ const std::string& component) const {
+ SchemaMap::const_iterator iter = components().find(component);
+ if (iter != components().end())
+ return iter->second;
+ return NULL;
+}
+
void PolicyDomainDescriptor::RegisterComponent(
const std::string& component_id,
scoped_ptr<PolicySchema> schema) {
« no previous file with comments | « chrome/browser/policy/policy_domain_descriptor.h ('k') | chrome/browser/policy/policy_loader_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698