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

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

Issue 18153007: Add policies to control power management on the Chrome OS login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct example in policy_templates.json. Created 7 years, 5 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/values.h" 13 #include "base/values.h"
13 #include "chrome/browser/prefs/incognito_mode_prefs.h" 14 #include "chrome/browser/prefs/incognito_mode_prefs.h"
14 #include "chrome/common/content_settings.h" 15 #include "chrome/common/content_settings.h"
15 16
16 class PrefValueMap; 17 class PrefValueMap;
17 18
18 namespace policy { 19 namespace policy {
19 20
20 class PolicyErrorMap; 21 class PolicyErrorMap;
21 class PolicyMap; 22 class PolicyMap;
22 23
23 // An abstract super class that subclasses should implement to map policies to 24 // An abstract super class that subclasses should implement to map policies to
24 // their corresponding preferences, and to check whether the policies are valid. 25 // their corresponding preferences, and to check whether the policies are valid.
25 class ConfigurationPolicyHandler { 26 class ConfigurationPolicyHandler {
26 public: 27 public:
28 static std::string ValueTypeToString(Value::Type type);
29
27 ConfigurationPolicyHandler(); 30 ConfigurationPolicyHandler();
28 virtual ~ConfigurationPolicyHandler(); 31 virtual ~ConfigurationPolicyHandler();
29 32
30 // Returns whether the policy settings handled by this 33 // Returns whether the policy settings handled by this
31 // ConfigurationPolicyHandler can be applied. Fills |errors| with error 34 // ConfigurationPolicyHandler can be applied. Fills |errors| with error
32 // messages or warnings. |errors| may contain error messages even when 35 // messages or warnings. |errors| may contain error messages even when
33 // |CheckPolicySettings()| returns true. 36 // |CheckPolicySettings()| returns true.
34 virtual bool CheckPolicySettings(const PolicyMap& policies, 37 virtual bool CheckPolicySettings(const PolicyMap& policies,
35 PolicyErrorMap* errors) = 0; 38 PolicyErrorMap* errors) = 0;
36 39
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 private: 538 private:
536 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies, 539 void ApplyPolicySettingsFromHomePage(const PolicyMap& policies,
537 PrefValueMap* prefs); 540 PrefValueMap* prefs);
538 541
539 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler); 542 DISALLOW_COPY_AND_ASSIGN(RestoreOnStartupPolicyHandler);
540 }; 543 };
541 544
542 } // namespace policy 545 } // namespace policy
543 546
544 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_ 547 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/policy/configuration_policy_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698