Index: remoting/host/it2me/it2me_host.cc |
diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc |
index e5e6196803862eff219fc098678a45d874c3787f..070adac756acf43bd0b3b7c2dbd44daebee39922 100644 |
--- a/remoting/host/it2me/it2me_host.cc |
+++ b/remoting/host/it2me/it2me_host.cc |
@@ -356,8 +356,7 @@ void It2MeHost::OnClientDisconnected(const std::string& jid) { |
} |
void It2MeHost::OnPolicyUpdate(scoped_ptr<base::DictionaryValue> policies) { |
- // The policy watcher runs on the |ui_task_runner| on ChromeOS and the |
- // |network_task_runner| on other platforms. |
+ // The policy watcher runs on the |ui_task_runner|. |
if (!host_context_->network_task_runner()->BelongsToCurrentThread()) { |
host_context_->network_task_runner()->PostTask( |
Łukasz Anforowicz
2015/01/30 05:35:55
After your changes, OnPolicyUpdate will always be
Sergey Ulanov
2015/01/30 19:33:45
This callback is called on UI thread, but we still
Łukasz Anforowicz
2015/01/30 19:50:59
Acknowledged.
|
FROM_HERE, |
@@ -532,10 +531,13 @@ scoped_refptr<It2MeHost> It2MeHostFactory::CreateIt2MeHost( |
base::WeakPtr<It2MeHost::Observer> observer, |
const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
const std::string& directory_bot_jid) { |
+ DCHECK(context->ui_task_runner()->BelongsToCurrentThread()); |
+ |
scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( |
new It2MeConfirmationDialogFactory()); |
scoped_ptr<policy_hack::PolicyWatcher> policy_watcher = |
policy_hack::PolicyWatcher::Create(policy_service_, |
+ context->ui_task_runner(), |
context->network_task_runner()); |
Łukasz Anforowicz
2015/01/30 05:35:55
I wonder if we should be using file_task_runner he
Sergey Ulanov
2015/01/30 19:33:45
Yes, you are right. From the AsyncPolicyLoader nam
|
return new It2MeHost(context.Pass(), policy_watcher.Pass(), |
confirmation_dialog_factory.Pass(), |