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

Unified Diff: components/policy/core/common/configuration_policy_provider.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 browsertest and removed unnecessary string for default values. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/configuration_policy_provider.h
diff --git a/components/policy/core/common/configuration_policy_provider.h b/components/policy/core/common/configuration_policy_provider.h
index e91ac21e3977e21a3347dda723dfe7f3ed532834..63322cbf86195e603a6802904df6ed57983b21b5 100644
--- a/components/policy/core/common/configuration_policy_provider.h
+++ b/components/policy/core/common/configuration_policy_provider.h
@@ -74,6 +74,9 @@ class POLICY_EXPORT ConfigurationPolicyProvider
void OnSchemaRegistryUpdated(bool has_new_schemas) override;
void OnSchemaRegistryReady() override;
+ // Template Method used to inject a providers source into |UpdatePolicy|.
Thiemo Nagel 2015/09/01 17:40:37 Could you please add a source_ member and make tha
fhorschig 2015/09/04 06:53:54 Done.
+ virtual PolicySource source() const = 0;
+
protected:
// Subclasses must invoke this to update the policies currently served by
// this provider. UpdatePolicy() takes ownership of |policies|.
@@ -85,6 +88,10 @@ class POLICY_EXPORT ConfigurationPolicyProvider
const scoped_refptr<SchemaMap>& schema_map() const;
private:
+ // Used to tag all policies provided by this provider coming from a specific
+ // source.
+ void SetSources(PolicySource source);
Thiemo Nagel 2015/09/01 17:40:37 Again I think it would be clearer to call this "Se
fhorschig 2015/09/04 06:53:54 The name is misleading. This function actually set
+
// The policies currently configured at this provider.
PolicyBundle policy_bundle_;

Powered by Google App Engine
This is Rietveld 408576698