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

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

Issue 2027010: Preference provider implementation backed by JSON files in a directory. (Closed)
Patch Set: A few more fixes. Created 10 years, 7 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
« no previous file with comments | « base/values_unittest.cc ('k') | chrome/browser/config_dir_policy_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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_CONFIG_DIR_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_CONFIG_DIR_POLICY_PROVIDER_H_
7
8 #include "base/basictypes.h"
9 #include "base/file_path.h"
10 #include "chrome/browser/configuration_policy_provider.h"
11
12 class DictionaryValue;
13
14 // A policy provider implementation backed by a set of files in a given
15 // directory. The files should contain JSON-formatted policy settings. They are
16 // merged together and the result is returned via the
17 // ConfigurationPolicyProvider interface. The files are consulted in
18 // lexicographic file name order, so the last value read takes precedence in
19 // case of preference key collisions.
20 class ConfigDirPolicyProvider : public ConfigurationPolicyProvider {
21 public:
22 explicit ConfigDirPolicyProvider(const FilePath& config_dir);
23 virtual ~ConfigDirPolicyProvider() { }
24
25 // ConfigurationPolicyProvider implementation.
26 virtual bool Provide(ConfigurationPolicyStore* store);
27
28 private:
29 // Read and merge the files from the configuration directory.
30 DictionaryValue* ReadPolicies();
31
32 // The directory in which we look for configuration files.
33 const FilePath config_dir_;
34
35 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProvider);
36 };
37
38 #endif // CHROME_BROWSER_CONFIG_DIR_POLICY_PROVIDER_H_
OLDNEW
« no previous file with comments | « base/values_unittest.cc ('k') | chrome/browser/config_dir_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698