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

Side by Side Diff: chrome/browser/policy/configuration_policy_handler_interface.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, 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_INTERFACE_H_
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_INTERFACE_H_
7 #pragma once
8
9 class PrefValueMap;
10
11 namespace policy {
12
13 class PolicyErrorMap;
14 class PolicyMap;
15
16 // An abstract super class that subclasses should implement to map a policy
17 // configuration to the appropriate preferences and to check whether a policy
18 // configuration is valid.
19 class ConfigurationPolicyHandlerInterface {
20 public:
21 ConfigurationPolicyHandlerInterface() {}
22 virtual ~ConfigurationPolicyHandlerInterface() {}
23
24 // Returns true if the policy settings handled by this
25 // ConfigurationPolicyHandler can be applied and false otherwise. Fills
26 // |errors| with error messages or warnings. |errors| may contain error
27 // messages even when |CheckPolicySettings()| returns true.
28 virtual bool CheckPolicySettings(const PolicyMap* policies,
29 PolicyErrorMap* errors) = 0;
30
31 // Processes the policies handled by this ConfigurationPolicyHandler and sets
32 // the appropriate preferences in |prefs|.
33 virtual void ApplyPolicySettings(const PolicyMap* policies,
34 PrefValueMap* prefs) = 0;
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyHandlerInterface);
38 };
39
40 } // namespace policy
41
42 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698