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

Unified Diff: remoting/host/policy_hack/policy_watcher.h

Issue 639233002: Remote assistance on Chrome OS Part IV - It2MeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ChromotingHostContext cleanup Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
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..c1f79a9842b95b3a5f72394e449463a7445bf5cd 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 "components/policy/core/common/policy_service.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 it.
+ virtual void StopWatching(const base::Closure& stopped_callback);
// Implemented by each platform. This message loop should be an IO message
// loop.
- static PolicyWatcher* Create(
+ static scoped_ptr<PolicyWatcher> Create(
+ policy::PolicyService* policy_service,
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();
Wez 2014/10/24 00:28:48 Why virtual?
kelvinp 2014/10/24 21:39:42 Done.
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
PolicyCallback policy_callback_;

Powered by Google App Engine
This is Rietveld 408576698