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

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

Issue 9111022: Removed ConfigurationPolicyType and extended PolicyMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 11 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) 2011 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_CONFIG_DIR_POLICY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_ 6 #define CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/policy/file_based_policy_provider.h" 11 #include "chrome/browser/policy/file_based_policy_provider.h"
12 12
13 class FilePath; 13 class FilePath;
14 14
15 namespace policy { 15 namespace policy {
16 16
17 // Policy provider backed by JSON files in a configuration directory. 17 // Policy provider backed by JSON files in a configuration directory.
18 class ConfigDirPolicyProvider : public FileBasedPolicyProvider { 18 class ConfigDirPolicyProvider : public FileBasedPolicyProvider {
19 public: 19 public:
20 ConfigDirPolicyProvider(const PolicyDefinitionList* policy_list, 20 ConfigDirPolicyProvider(const PolicyDefinitionList* policy_list,
21 PolicyLevel level,
21 const FilePath& config_dir); 22 const FilePath& config_dir);
22 23
23 private: 24 private:
24 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProvider); 25 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProvider);
25 }; 26 };
26 27
27 // A provider delegate implementation backed by a set of files in a given 28 // A provider delegate implementation backed by a set of files in a given
28 // directory. The files should contain JSON-formatted policy settings. They are 29 // directory. The files should contain JSON-formatted policy settings. They are
29 // merged together and the result is returned via the ProviderDelegate 30 // merged together and the result is returned via the ProviderDelegate
30 // interface. The files are consulted in lexicographic file name order, so the 31 // interface. The files are consulted in lexicographic file name order, so the
31 // last value read takes precedence in case of preference key collisions. 32 // last value read takes precedence in case of preference key collisions.
32 class ConfigDirPolicyProviderDelegate 33 class ConfigDirPolicyProviderDelegate
33 : public FileBasedPolicyProvider::ProviderDelegate { 34 : public FileBasedPolicyProvider::ProviderDelegate {
34 public: 35 public:
35 explicit ConfigDirPolicyProviderDelegate(const FilePath& config_dir); 36 explicit ConfigDirPolicyProviderDelegate(const FilePath& config_dir);
36 37
37 // FileBasedPolicyProvider::ProviderDelegate implementation. 38 // FileBasedPolicyProvider::ProviderDelegate implementation.
38 virtual DictionaryValue* Load() OVERRIDE; 39 virtual DictionaryValue* Load() OVERRIDE;
39 virtual base::Time GetLastModification() OVERRIDE; 40 virtual base::Time GetLastModification() OVERRIDE;
40 41
41 private: 42 private:
42 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProviderDelegate); 43 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProviderDelegate);
43 }; 44 };
44 45
45 } // namespace policy 46 } // namespace policy
46 47
47 #endif // CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_ 48 #endif // CHROME_BROWSER_POLICY_CONFIG_DIR_POLICY_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_subsystem_unittest.cc ('k') | chrome/browser/policy/config_dir_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698