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

Side by Side Diff: chrome/browser/policy/configuration_policy_handler.h

Issue 8139029: Make policy errors available to display in about:policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unused replacement string DCHECK from policy_error_map.cc Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "base/basictypes.h"
12
13 class PrefValueMap;
14
15 namespace policy {
16
17 class PolicyErrorMap;
18 class PolicyMap;
19
20 // An abstract super class that subclasses should implement to map policies to
21 // their corresponding preferences, and to check whether the policies are valid.
22 class ConfigurationPolicyHandler {
23 public:
24 typedef std::vector<ConfigurationPolicyHandler*> HandlerList;
25
26 ConfigurationPolicyHandler() {}
27 virtual ~ConfigurationPolicyHandler() {}
28
29 // Returns true if the policy settings handled by this
30 // ConfigurationPolicyHandler can be applied and false otherwise. Fills
31 // |errors| with error messages or warnings. |errors| may contain error
32 // messages even when |CheckPolicySettings()| returns true.
33 virtual bool CheckPolicySettings(const PolicyMap* policies,
34 PolicyErrorMap* errors) = 0;
35
36 // Processes the policies handled by this ConfigurationPolicyHandler and sets
37 // the appropriate preferences in |prefs|.
38 virtual void ApplyPolicySettings(const PolicyMap* policies,
39 PrefValueMap* prefs) = 0;
40
41 // Creates a new HandlerList with all the known handlers and returns it.
42 // The new list and its elements are owned by the caller.
43 static HandlerList* CreateHandlerList();
44
45 private:
46 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyHandler);
47 };
48
49 } // namespace policy
50
51 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/config_dir_policy_provider_unittest.cc ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698