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

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: Increased ID range for Messages. 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..9b06dda2350d40308b067936ea475113883837db 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;
+ // Returns where the provided policies originate from.
Thiemo Nagel 2015/09/04 20:15:54 In my opinion, a 1-line getter isn't worth a comme
fhorschig 2015/09/07 14:09:34 Done.
+ PolicySource source() const { return source_; }
+
protected:
// Subclasses must invoke this to update the policies currently served by
// this provider. UpdatePolicy() takes ownership of |policies|.
@@ -84,7 +87,15 @@ class POLICY_EXPORT ConfigurationPolicyProvider
const scoped_refptr<SchemaMap>& schema_map() const;
+ // This provider provides a policies only from one source at a time. And this
Thiemo Nagel 2015/09/04 20:15:54 "a policies" --> "policies" ". And this source is
fhorschig 2015/09/07 14:09:34 Done.
+ // source is stored in this value (defaulting to POLICY_SOURCE_UNKNOWN).
+ PolicySource source_;
+
private:
+ // Used to tag all policies provided by this provider as coming from a
Thiemo Nagel 2015/09/04 20:15:54 Not from "a specific source" but from "|source_|".
fhorschig 2015/09/07 14:09:34 Done.
+ // specific source.
+ void SetPolicySources();
+
// The policies currently configured at this provider.
PolicyBundle policy_bundle_;

Powered by Google App Engine
This is Rietveld 408576698