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

Unified Diff: chrome/browser/policy/configuration_policy_provider.h

Issue 6409040: New policy protobuf protocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review! Created 9 years, 11 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: chrome/browser/policy/configuration_policy_provider.h
diff --git a/chrome/browser/policy/configuration_policy_provider.h b/chrome/browser/policy/configuration_policy_provider.h
index af2cddf914d8d30bc56ba1373b1d347513c38650..f8e57d81b9d87bb5639125b741d4a9a2182de579 100644
--- a/chrome/browser/policy/configuration_policy_provider.h
+++ b/chrome/browser/policy/configuration_policy_provider.h
@@ -6,15 +6,21 @@
#define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_H_
#pragma once
+#include <map>
#include <string>
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/values.h"
#include "chrome/browser/policy/configuration_policy_store_interface.h"
+// configuration_policy_type.h is generated. See policy_templates.json for
+// policy definitions.
Mattias Nissler (ping if slow) 2011/02/02 12:27:55 I'm no fan of repeating that comment over and over
Jakob Kummerow 2011/02/03 14:36:52 Done.
+#include "policy/configuration_policy_type.h"
namespace policy {
+typedef std::map<ConfigurationPolicyType, Value*> PolicyMapType;
Mattias Nissler (ping if slow) 2011/02/02 12:27:55 That should really be a typedef inside Configurati
Jakob Kummerow 2011/02/03 14:36:52 Done. As you wish.
+
// A mostly-abstract super class for platform-specific policy providers.
// Platform-specific policy providers (Windows Group Policy, gconf,
// etc.) should implement a subclass of this class.
@@ -62,6 +68,11 @@ class ConfigurationPolicyProvider {
void DecodePolicyValueTree(const DictionaryValue* policies,
ConfigurationPolicyStoreInterface* store);
+ // Writes the configuration found in the already-decoded map |policies| to
+ // the given |store|.
+ void ApplyPolicyMap(const PolicyMapType* policies,
Mattias Nissler (ping if slow) 2011/02/02 12:27:55 Can we name that similar to DecodePolicyValueTree?
Jakob Kummerow 2011/02/03 14:36:52 Done.
+ ConfigurationPolicyStoreInterface* store);
+
const PolicyDefinitionList* policy_definition_list() const {
return policy_definition_list_;
}

Powered by Google App Engine
This is Rietveld 408576698