OLD | NEW |
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_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" | 9 #include "chrome/browser/file_path_watcher/file_path_watcher.h" |
10 #include "chrome/browser/policy/asynchronous_policy_loader.h" | 10 #include "chrome/browser/policy/asynchronous_policy_loader.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 friend class base::RefCountedThreadSafe<AsynchronousPolicyLoader>; | 35 friend class base::RefCountedThreadSafe<AsynchronousPolicyLoader>; |
36 virtual ~FileBasedPolicyLoader(); | 36 virtual ~FileBasedPolicyLoader(); |
37 | 37 |
38 const FilePath& config_file_path() { return config_file_path_; } | 38 const FilePath& config_file_path() { return config_file_path_; } |
39 | 39 |
40 private: | 40 private: |
41 // Finishes initialization after the threading system has been fully | 41 // Finishes initialization after the threading system has been fully |
42 // intiialized. | 42 // intiialized. |
43 void InitAfterFileThreadAvailable(); | 43 void InitAfterFileThreadAvailable(); |
44 | 44 |
45 // Creates the file path watcher and configures it watch |config_file_path_|. | 45 // Creates the file path watcher, configures it to watch |config_file_path_| |
46 // Must be called on the file thread. | 46 // and schedules the fallback reload task. Must be called on the file thread. |
47 void InitWatcher(); | 47 void InitOnFileThread(); |
48 | 48 |
49 // Cancels file path watch notification and destroys the watcher. | 49 // Cancels file path watch notification and destroys the watcher. |
50 // Must be called on file thread. | 50 // Must be called on file thread. |
51 void StopOnFileThread(); | 51 void StopOnFileThread(); |
52 | 52 |
53 // Schedules a reload task to run when |delay| expires. Must be called on the | 53 // Schedules a reload task to run when |delay| expires. Must be called on the |
54 // file thread. | 54 // file thread. |
55 void ScheduleReloadTask(const base::TimeDelta& delay); | 55 void ScheduleReloadTask(const base::TimeDelta& delay); |
56 | 56 |
57 // Schedules a reload task to run after the number of minutes specified | 57 // Schedules a reload task to run after the number of minutes specified |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // wall clock times come from the same source, just in case there is some | 95 // wall clock times come from the same source, just in case there is some |
96 // non-local filesystem involved. | 96 // non-local filesystem involved. |
97 base::Time last_modification_clock_; | 97 base::Time last_modification_clock_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyLoader); | 99 DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyLoader); |
100 }; | 100 }; |
101 | 101 |
102 } // namespace policy | 102 } // namespace policy |
103 | 103 |
104 #endif // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ | 104 #endif // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_LOADER_H_ |
OLD | NEW |