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

Unified Diff: remoting/host/it2me/it2me_host.h

Issue 639233002: Remote assistance on Chrome OS Part IV - It2MeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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,

Powered by Google App Engine
This is Rietveld 408576698