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

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

Issue 8480003: Surface error messages from ONC parsing in about:policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, break out code gen / unit test changes. Created 9 years, 1 month 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 TypeCheckingPolicyHandler(ConfigurationPolicyType policy_type, 53 TypeCheckingPolicyHandler(ConfigurationPolicyType policy_type,
54 base::Value::Type value_type); 54 base::Value::Type value_type);
55 55
56 // ConfigurationPolicyHandler methods: 56 // ConfigurationPolicyHandler methods:
57 virtual bool CheckPolicySettings(const PolicyMap& policies, 57 virtual bool CheckPolicySettings(const PolicyMap& policies,
58 PolicyErrorMap* errors) OVERRIDE; 58 PolicyErrorMap* errors) OVERRIDE;
59 59
60 protected: 60 protected:
61 virtual ~TypeCheckingPolicyHandler(); 61 virtual ~TypeCheckingPolicyHandler();
62 62
63 // Runs policy checks and returns the policy value if successful.
64 bool CheckAndGetValue(const PolicyMap& policies,
65 PolicyErrorMap* errors,
66 const Value** value);
67
63 ConfigurationPolicyType policy_type() const; 68 ConfigurationPolicyType policy_type() const;
64 69
65 private: 70 private:
66 // The ConfigurationPolicyType of the policy. 71 // The ConfigurationPolicyType of the policy.
67 ConfigurationPolicyType policy_type_; 72 ConfigurationPolicyType policy_type_;
68 73
69 // The type the value of the policy should have. 74 // The type the value of the policy should have.
70 base::Value::Type value_type_; 75 base::Value::Type value_type_;
71 76
72 DISALLOW_COPY_AND_ASSIGN(TypeCheckingPolicyHandler); 77 DISALLOW_COPY_AND_ASSIGN(TypeCheckingPolicyHandler);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 virtual void ApplyPolicySettings(const PolicyMap& policies, 282 virtual void ApplyPolicySettings(const PolicyMap& policies,
278 PrefValueMap* prefs) OVERRIDE; 283 PrefValueMap* prefs) OVERRIDE;
279 284
280 private: 285 private:
281 DISALLOW_COPY_AND_ASSIGN(JavascriptPolicyHandler); 286 DISALLOW_COPY_AND_ASSIGN(JavascriptPolicyHandler);
282 }; 287 };
283 288
284 } // namespace policy 289 } // namespace policy
285 290
286 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 291 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698