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

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

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another test. Created 5 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
Index: components/policy/core/common/policy_map.h
diff --git a/components/policy/core/common/policy_map.h b/components/policy/core/common/policy_map.h
index 7d0d06b80b4ba35e13154726b2dabd17d7e86a43..8ff480a71c2102652b2692f18d66943f20adaf93 100644
--- a/components/policy/core/common/policy_map.h
+++ b/components/policy/core/common/policy_map.h
@@ -28,6 +28,9 @@ class POLICY_EXPORT PolicyMap {
base::Value* value;
ExternalDataFetcher* external_data_fetcher;
+ // For debugging and displaying only. Set by provider delivering the policy.
+ PolicySource source;
+
Entry();
// Deletes all members owned by |this|.
@@ -63,6 +66,7 @@ class POLICY_EXPORT PolicyMap {
void Set(const std::string& policy,
PolicyLevel level,
PolicyScope scope,
+ PolicySource source,
base::Value* value,
ExternalDataFetcher* external_data_fetcher);
@@ -85,11 +89,12 @@ class POLICY_EXPORT PolicyMap {
void MergeFrom(const PolicyMap& other);
// Loads the values in |policies| into this PolicyMap. All policies loaded
- // will have |level| and |scope| in their entries. Existing entries are
- // replaced.
+ // will have |level|, |scope| and |source| in their entries. Existing entries
+ // are replaced.
void LoadFrom(const base::DictionaryValue* policies,
PolicyLevel level,
- PolicyScope scope);
+ PolicyScope scope,
+ PolicySource source);
// Compares this value map against |other| and stores all key names that have
// different values or reference different external data in |differing_keys|.
« no previous file with comments | « components/policy/core/common/policy_loader_win_unittest.cc ('k') | components/policy/core/common/policy_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698