OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FILE_BASED_POLICY_LOADER_H_ | 5 #ifndef CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ |
6 #define CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ | 6 #define CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/file_path_watcher/file_path_watcher.h" | |
10 #include "chrome/browser/policy/asynchronous_policy_loader.h" | 9 #include "chrome/browser/policy/asynchronous_policy_loader.h" |
11 #include "chrome/browser/policy/file_based_policy_provider.h" | 10 #include "chrome/browser/policy/file_based_policy_provider.h" |
| 11 #include "content/common/file_path_watcher/file_path_watcher.h" |
12 | 12 |
13 namespace policy { | 13 namespace policy { |
14 | 14 |
15 // A customized asynchronous policy loader that handles loading policy from a | 15 // A customized asynchronous policy loader that handles loading policy from a |
16 // file using a FilePathWatcher. The loader creates a fallback task to load | 16 // file using a FilePathWatcher. The loader creates a fallback task to load |
17 // policy periodically in case the watcher fails and retries policy loads when | 17 // policy periodically in case the watcher fails and retries policy loads when |
18 // the watched file is in flux. | 18 // the watched file is in flux. |
19 class FileBasedPolicyLoader : public AsynchronousPolicyLoader { | 19 class FileBasedPolicyLoader : public AsynchronousPolicyLoader { |
20 public: | 20 public: |
21 FileBasedPolicyLoader( | 21 FileBasedPolicyLoader( |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // wall clock times come from the same source, just in case there is some | 69 // wall clock times come from the same source, just in case there is some |
70 // non-local filesystem involved. | 70 // non-local filesystem involved. |
71 base::Time last_modification_clock_; | 71 base::Time last_modification_clock_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyLoader); | 73 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyLoader); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace policy | 76 } // namespace policy |
77 | 77 |
78 #endif // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ | 78 #endif // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ |
OLD | NEW |