Chromium Code Reviews| Index: remoting/protocol/protocol_test_client.cc |
| diff --git a/remoting/protocol/protocol_test_client.cc b/remoting/protocol/protocol_test_client.cc |
| index f9b0010aa6f066d44b1ff524c1cd1856fa7a1dc3..faf13724e0e9f8878be9dc26744c14b95ecf8e27 100644 |
| --- a/remoting/protocol/protocol_test_client.cc |
| +++ b/remoting/protocol/protocol_test_client.cc |
| @@ -16,6 +16,8 @@ extern "C" { |
| #include "base/at_exit.h" |
| #include "base/bind.h" |
| #include "base/command_line.h" |
| +#include "base/message_loop_proxy.h" |
| +#include "base/synchronization/waitable_event.h" |
| #include "base/test/mock_chrome_application_mac.h" |
| #include "base/time.h" |
| #include "crypto/nss_util.h" |
| @@ -32,8 +34,17 @@ namespace remoting { |
| namespace protocol { |
| namespace { |
| + |
| const int kBufferSize = 4096; |
| const char kDummyAuthToken[] = ""; |
| + |
| +void InitializeMessageLoopProxy( |
| + scoped_refptr<base::MessageLoopProxy>* proxy, |
| + base::WaitableEvent* done) { |
| + *proxy = base::MessageLoopProxy::CreateForCurrentThread(); |
| + done->Signal(); |
| +} |
| + |
| } // namespace |
| class ProtocolTestClient; |
| @@ -218,11 +229,18 @@ void ProtocolTestClient::Run(const std::string& username, |
| remoting::JingleThread jingle_thread; |
| jingle_thread.Start(); |
| + scoped_refptr<base::MessageLoopProxy> network_message_loop; |
| + base::WaitableEvent proxy_event(true, false); |
| + jingle_thread.message_loop()->PostTask(FROM_HERE, base::Bind( |
| + &InitializeMessageLoopProxy, &network_message_loop, &proxy_event)); |
| + proxy_event.Wait(); |
|
Wez
2011/08/12 21:11:20
Thread::message_loop_proxy() again.
Sergey Ulanov
2011/08/12 21:24:18
Done.
|
| + |
| signal_strategy_.reset( |
| new XmppSignalStrategy(&jingle_thread, username, auth_token, |
| auth_service)); |
| signal_strategy_->Init(this); |
| - session_manager_.reset(JingleSessionManager::CreateNotSandboxed()); |
| + session_manager_.reset( |
| + JingleSessionManager::CreateNotSandboxed(network_message_loop)); |
| host_jid_ = host_jid; |