Chromium Code Reviews| Index: remoting/host/policy_hack/policy_watcher.h |
| diff --git a/remoting/host/policy_hack/policy_watcher.h b/remoting/host/policy_hack/policy_watcher.h |
| index 0ced8f23a4a7c55437e8fb0566dbb359a8c8adef..bfd8852384931c049c1771942bb31577f42b9adb 100644 |
| --- a/remoting/host/policy_hack/policy_watcher.h |
| +++ b/remoting/host/policy_hack/policy_watcher.h |
| @@ -8,6 +8,7 @@ |
| #include "base/callback.h" |
| #include "base/memory/weak_ptr.h" |
| #include "base/values.h" |
| +#include "remoting/host/chromoting_host_context.h" |
| namespace base { |
| class SingleThreadTaskRunner; |
| @@ -38,12 +39,13 @@ class PolicyWatcher { |
| virtual void StartWatching(const PolicyCallback& policy_callback); |
| // Should be called after StartWatching() before the object is deleted. Calls |
| - // just wait for |done| to be signaled before deleting the object. |
| - virtual void StopWatching(base::WaitableEvent* done); |
| + // should wait for |stopped_callback| to be called before deleting the object. |
| + virtual void StopWatching(const base::Closure& stopped_callback); |
| // Implemented by each platform. This message loop should be an IO message |
| // loop. |
| static PolicyWatcher* Create( |
| + ChromotingHostContext* context, |
|
Wez
2014/10/17 17:58:01
Don't pass the ChromotingHostContext around; it's
kelvinp
2014/10/20 00:21:18
I will avoid passing the context but pass the poli
|
| scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| // The name of the NAT traversal policy. |
| @@ -107,6 +109,7 @@ class PolicyWatcher { |
| const base::DictionaryValue& Defaults() const; |
| private: |
| + virtual void StopWatchingOnPolicyWatcherThread(); |
| scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| PolicyCallback policy_callback_; |