| Index: remoting/protocol/protocol_test_client.cc
|
| diff --git a/remoting/protocol/protocol_test_client.cc b/remoting/protocol/protocol_test_client.cc
|
| index b9d8d0ae43c0cba4d40846c44d2dbe5fecf08714..faf13724e0e9f8878be9dc26744c14b95ecf8e27 100644
|
| --- a/remoting/protocol/protocol_test_client.cc
|
| +++ b/remoting/protocol/protocol_test_client.cc
|
| @@ -17,6 +17,7 @@ extern "C" {
|
| #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"
|
| @@ -33,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;
|
| @@ -219,12 +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();
|
| +
|
| signal_strategy_.reset(
|
| new XmppSignalStrategy(&jingle_thread, username, auth_token,
|
| auth_service));
|
| signal_strategy_->Init(this);
|
| - session_manager_.reset(JingleSessionManager::CreateNotSandboxed(
|
| - jingle_thread.message_loop_proxy()));
|
| + session_manager_.reset(
|
| + JingleSessionManager::CreateNotSandboxed(network_message_loop));
|
|
|
| host_jid_ = host_jid;
|
|
|
|
|