OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 REMOTING_HOST_POLICY_HACK_POLICY_WATCHER_H_ | 5 #ifndef REMOTING_HOST_POLICY_HACK_POLICY_WATCHER_H_ |
6 #define REMOTING_HOST_POLICY_HACK_POLICY_WATCHER_H_ | 6 #define REMOTING_HOST_POLICY_HACK_POLICY_WATCHER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // The name of the policy for requiring 2-factor authentication. | 52 // The name of the policy for requiring 2-factor authentication. |
53 static const char kHostRequireTwoFactorPolicyName[]; | 53 static const char kHostRequireTwoFactorPolicyName[]; |
54 | 54 |
55 // The name of the host domain policy. | 55 // The name of the host domain policy. |
56 static const char kHostDomainPolicyName[]; | 56 static const char kHostDomainPolicyName[]; |
57 | 57 |
58 // The name of the policy that controls the host talkgadget prefix. | 58 // The name of the policy that controls the host talkgadget prefix. |
59 static const char kHostTalkGadgetPrefixPolicyName[]; | 59 static const char kHostTalkGadgetPrefixPolicyName[]; |
60 | 60 |
| 61 // The name of the policy for requiring curtain-mode. |
| 62 static const char kHostRequireCurtainPolicyName[]; |
| 63 |
61 protected: | 64 protected: |
62 virtual void StartWatchingInternal() = 0; | 65 virtual void StartWatchingInternal() = 0; |
63 virtual void StopWatchingInternal() = 0; | 66 virtual void StopWatchingInternal() = 0; |
64 virtual void Reload() = 0; | 67 virtual void Reload() = 0; |
65 | 68 |
66 // Used to check if the class is on the right thread. | 69 // Used to check if the class is on the right thread. |
67 bool OnPolicyWatcherThread() const; | 70 bool OnPolicyWatcherThread() const; |
68 | 71 |
69 // Takes the policy dictionary from the OS specific store and extracts the | 72 // Takes the policy dictionary from the OS specific store and extracts the |
70 // relevant policies. | 73 // relevant policies. |
(...skipping 20 matching lines...) Expand all Loading... |
91 scoped_ptr<base::DictionaryValue> old_policies_; | 94 scoped_ptr<base::DictionaryValue> old_policies_; |
92 | 95 |
93 // Allows us to cancel any inflight FileWatcher events or scheduled reloads. | 96 // Allows us to cancel any inflight FileWatcher events or scheduled reloads. |
94 base::WeakPtrFactory<PolicyWatcher> weak_factory_; | 97 base::WeakPtrFactory<PolicyWatcher> weak_factory_; |
95 }; | 98 }; |
96 | 99 |
97 } // namespace policy_hack | 100 } // namespace policy_hack |
98 } // namespace remoting | 101 } // namespace remoting |
99 | 102 |
100 #endif // REMOTING_HOST_POLICY_HACK_POLICY_WATCHER_H_ | 103 #endif // REMOTING_HOST_POLICY_HACK_POLICY_WATCHER_H_ |
OLD | NEW |