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

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

Issue 7941008: Cosmetic cleanups in chrome/browser/policy/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload was broken? Created 9 years, 3 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) 2010 The Chromium Authors. All rights reserved. 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 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"
10 #include "base/values.h"
9 #include "chrome/browser/policy/file_based_policy_provider.h" 11 #include "chrome/browser/policy/file_based_policy_provider.h"
10 12
13 class FilePath;
14
11 namespace policy { 15 namespace policy {
12 16
13 // Policy provider backed by JSON files in a configuration directory. 17 // Policy provider backed by JSON files in a configuration directory.
14 class ConfigDirPolicyProvider : public FileBasedPolicyProvider { 18 class ConfigDirPolicyProvider : public FileBasedPolicyProvider {
15 public: 19 public:
16 ConfigDirPolicyProvider( 20 ConfigDirPolicyProvider(
17 const ConfigurationPolicyProvider::PolicyDefinitionList* policy_list, 21 const ConfigurationPolicyProvider::PolicyDefinitionList* policy_list,
18 const FilePath& config_dir); 22 const FilePath& config_dir);
19 23
20 private: 24 private:
21 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProvider); 25 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProvider);
22 }; 26 };
23 27
24 // 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
25 // directory. The files should contain JSON-formatted policy settings. They are 29 // directory. The files should contain JSON-formatted policy settings. They are
26 // merged together and the result is returned via the ProviderDelegate 30 // merged together and the result is returned via the ProviderDelegate
27 // 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
28 // last value read takes precedence in case of preference key collisions. 32 // last value read takes precedence in case of preference key collisions.
29 class ConfigDirPolicyProviderDelegate 33 class ConfigDirPolicyProviderDelegate
30 : public FileBasedPolicyProvider::ProviderDelegate { 34 : public FileBasedPolicyProvider::ProviderDelegate {
31 public: 35 public:
32 explicit ConfigDirPolicyProviderDelegate(const FilePath& config_dir); 36 explicit ConfigDirPolicyProviderDelegate(const FilePath& config_dir);
33 37
34 // FileBasedPolicyProvider::ProviderDelegate implementation. 38 // FileBasedPolicyProvider::ProviderDelegate implementation.
35 virtual DictionaryValue* Load(); 39 virtual DictionaryValue* Load() OVERRIDE;
36 virtual base::Time GetLastModification(); 40 virtual base::Time GetLastModification() OVERRIDE;
37 41
38 private: 42 private:
39 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProviderDelegate); 43 DISALLOW_COPY_AND_ASSIGN(ConfigDirPolicyProviderDelegate);
40 }; 44 };
41 45
42 } // namespace policy 46 } // namespace policy
43 47
44 #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.h ('k') | chrome/browser/policy/config_dir_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698