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

Unified Diff: components/policy/core/common/registry_dict_win.h

Issue 102493002: Use schemas bundled in extensions to convert policies loaded on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/registry_dict_win.h
diff --git a/components/policy/core/common/registry_dict_win.h b/components/policy/core/common/registry_dict_win.h
index fb480918851d5a6636be93445dfd3f6b71f6742c..da48c857da8b4262482b2ea280aff546c88939ed 100644
--- a/components/policy/core/common/registry_dict_win.h
+++ b/components/policy/core/common/registry_dict_win.h
@@ -16,12 +16,13 @@
#include "components/policy/policy_export.h"
namespace base {
-class DictionaryValue;
class Value;
}
namespace policy {
+class Schema;
+
// A case-insensitive string comparison functor.
struct POLICY_EXPORT CaseInsensitiveStringCompare {
bool operator()(const std::string& a, const std::string& b) const;
@@ -70,11 +71,10 @@ class POLICY_EXPORT RegistryDict {
void ReadRegistry(HKEY hive, const base::string16& root);
// Converts the dictionary to base::Value representation. For key/value name
- // collisions, the key wins. |schema| supplies an optional JSON schema that
- // will be used to map types to base::Value types. The returned object is
- // either a base::DictionaryValue or a base::ListValue.
- scoped_ptr<base::Value> ConvertToJSON(
- const base::DictionaryValue* schema) const;
+ // collisions, the key wins. |schema| is used to determine the expected type
+ // for each policy.
+ // The returned object is either a base::DictionaryValue or a base::ListValue.
+ scoped_ptr<base::Value> ConvertToJSON(const Schema& schema) const;
const KeyMap& keys() const { return keys_; }
const ValueMap& values() const { return values_; }
« no previous file with comments | « components/policy/core/common/policy_loader_win_unittest.cc ('k') | components/policy/core/common/registry_dict_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698