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

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: 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/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..7d59e6f5831669026089d4a31d8132c78c6b6b7d 100644
--- a/components/policy/core/common/configuration_policy_provider.h
+++ b/components/policy/core/common/configuration_policy_provider.h
@@ -74,6 +74,8 @@ class POLICY_EXPORT ConfigurationPolicyProvider
void OnSchemaRegistryUpdated(bool has_new_schemas) override;
void OnSchemaRegistryReady() override;
+ PolicySource source() const { return source_; }
bartfab (slow) 2015/09/14 14:42:27 Nit: #include "components/policy/core/common/polic
fhorschig 2015/09/16 13:52:05 Done.
+
protected:
// Subclasses must invoke this to update the policies currently served by
// this provider. UpdatePolicy() takes ownership of |policies|.
@@ -84,7 +86,14 @@ class POLICY_EXPORT ConfigurationPolicyProvider
const scoped_refptr<SchemaMap>& schema_map() const;
+ // This provider provides policies only from one source at a time (defaulting
+ // to POLICY_SOURCE_UNKNOWN).
+ PolicySource source_;
+
private:
+ // Used to tag all policies provided as coming from |source_|.
+ void SetPolicySources();
+
// The policies currently configured at this provider.
PolicyBundle policy_bundle_;

Powered by Google App Engine
This is Rietveld 408576698