Index: remoting/host/it2me/it2me_host.h |
diff --git a/remoting/host/it2me/it2me_host.h b/remoting/host/it2me/it2me_host.h |
index c24f2d10d4e6f136f47027888180a9cd35afc276..daf92448dea7cdd611a2e0b614dc248b1ddd4bf8 100644 |
--- a/remoting/host/it2me/it2me_host.h |
+++ b/remoting/host/it2me/it2me_host.h |
@@ -60,7 +60,7 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>, |
}; |
It2MeHost( |
- ChromotingHostContext* context, |
+ scoped_refptr<ChromotingHostContext> context, |
scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
base::WeakPtr<It2MeHost::Observer> observer, |
const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
@@ -91,7 +91,7 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>, |
virtual ~It2MeHost(); |
- ChromotingHostContext* host_context() { return host_context_; } |
+ ChromotingHostContext* host_context() { return host_context_.get(); } |
scoped_refptr<base::SingleThreadTaskRunner> task_runner() { |
return task_runner_; |
} |
@@ -123,6 +123,10 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>, |
// the UI thread. |
void ShutdownOnUiThread(); |
+ // Called when |policy_watcher_| has stopped listening for changes so that it |
+ // safe to delete the |policy_watcher_| object. |
+ void OnPolicyWatcherShutdown(); |
+ |
// Called when initial policies are read, and when they change. |
void OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies); |
@@ -134,7 +138,7 @@ class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>, |
// The creator of the It2MeHost object owns the the host context and is |
// responsible for keeping it alive throughout the liftime of the host. |
- ChromotingHostContext* host_context_; |
+ scoped_refptr<ChromotingHostContext> host_context_; |
scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
base::WeakPtr<It2MeHost::Observer> observer_; |
XmppSignalStrategy::XmppServerConfig xmpp_server_config_; |
@@ -182,7 +186,7 @@ class It2MeHostFactory { |
virtual ~It2MeHostFactory(); |
virtual scoped_refptr<It2MeHost> CreateIt2MeHost( |
- ChromotingHostContext* context, |
+ scoped_refptr<ChromotingHostContext> context, |
scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
base::WeakPtr<It2MeHost::Observer> observer, |
const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |