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

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

Issue 7972013: ConfigurationPolicyPrefStore refactoring to surface error messages. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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: chrome/browser/policy/configuration_policy_handler_factory.h
diff --git a/chrome/browser/policy/configuration_policy_handler_factory.h b/chrome/browser/policy/configuration_policy_handler_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..255ee4271a563bf14a7378df199cf8637653b539
--- /dev/null
+++ b/chrome/browser/policy/configuration_policy_handler_factory.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_FACTORY_H_
+#define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_FACTORY_H_
+#pragma once
+
+#include <vector>
+
+#include "base/values.h"
+#include "chrome/browser/policy/configuration_policy_handler_interface.h"
+#include "chrome/browser/policy/configuration_policy_pref_store.h"
+#include "policy/configuration_policy_type.h"
+#include "policy/policy_constants.h"
+
+namespace policy {
+
+// This class produces a list of all the ConfigurationPolicyHandlerInterface
+// instances needed to check and apply all policy settings.
+class ConfigurationPolicyHandlerFactory {
Mattias Nissler (ping if slow) 2011/09/20 13:12:25 seems like there's no reason to make this a class,
simo 2011/09/22 11:43:26 Okay, I've removed the class and renamed this file
+ public:
+ typedef std::vector<ConfigurationPolicyHandlerInterface*> HandlerList;
+ typedef std::vector<ConfigurationPolicyHandlerInterface*>::const_iterator
+ const_iterator;
+
+ // Returns a pointer to a |HandlerList| containing all available handlers
+ // derived from ConfigurationPolicyHandlerInterface.
+ static HandlerList* MakeHandlers();
+
+ private:
+ // Lists policies that map to a single preference. These are handled by
+ // SimplePolicyHandler. Each one of these policies has an entry in
+ // kSimplePolicyMap with the following type.
+ struct PolicyToPreferenceMapEntry {
+ base::Value::Type value_type;
+ ConfigurationPolicyType policy_type;
+ const char* preference_path; // A DictionaryValue path, not a file path.
+ };
+
+ static const PolicyToPreferenceMapEntry kSimplePolicyMap[];
+
+ DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyHandlerFactory);
+};
+
+} // namespace policy
+
+#endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698