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

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

Issue 10500013: Delete old policy code after AsyncPolicyLoader refactor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased Created 8 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_
6 #define CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_
7 #pragma once
8
9 #include "base/file_path.h"
10 #include "base/time.h"
11 #include "chrome/browser/policy/asynchronous_policy_provider.h"
12
13 namespace policy {
14
15 // File based policy provider that coordinates watching and reloading policy
16 // information from the configuration path. Actual logic for loading policy
17 // information is handled by a delegate passed at construction time.
18 class FileBasedPolicyProvider : public AsynchronousPolicyProvider {
19 public:
20
21 // Delegate interface for actual policy loading from the system.
22 class ProviderDelegate : public AsynchronousPolicyProvider::Delegate {
23 public:
24 explicit ProviderDelegate(const FilePath& config_file_path);
25 virtual ~ProviderDelegate();
26
27 // AsynchronousPolicyProvider::Delegate implementation:
28 virtual scoped_ptr<PolicyBundle> Load() = 0;
29
30 // Gets the last modification timestamp for the policy information from the
31 // filesystem. Returns base::Time() if the information is not present, in
32 // which case Load() should return an empty dictionary.
33 virtual base::Time GetLastModification() = 0;
34
35 const FilePath& config_file_path() { return config_file_path_; }
36
37 private:
38 const FilePath config_file_path_;
39
40 DISALLOW_COPY_AND_ASSIGN(ProviderDelegate);
41 };
42
43 // Assumes ownership of |delegate|.
44 FileBasedPolicyProvider(const PolicyDefinitionList* policy_list,
45 ProviderDelegate* delegate);
46 virtual ~FileBasedPolicyProvider() {}
47
48 private:
49 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyProvider);
50 };
51
52 } // namespace policy
53
54 #endif // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/file_based_policy_loader.cc ('k') | chrome/browser/policy/file_based_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698