summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 21:49:40 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 21:49:40 +0000
commitd45ab6164496793b199a22ed82c6aa5263674536 (patch)
tree27a304f2408487f77bb94cd41bb21a28e455c34f /chrome/browser
parent982921f1ba1f442e8b4ccd04093a5c6bd796c2fb (diff)
downloadchromium_src-d45ab6164496793b199a22ed82c6aa5263674536.zip
chromium_src-d45ab6164496793b199a22ed82c6aa5263674536.tar.gz
chromium_src-d45ab6164496793b199a22ed82c6aa5263674536.tar.bz2
Run a Chrome message loop on the mediator thread, allowing certificates to be verified.
BUG=none TEST= 1. Enable bookmark syncing on a mac or linux build. 2. Run chrome with --log-level=0. 3. Options menu -> Sync my Bookmarks. Log in. 4. Check that "XmppSocketAdapter::OnConnectEvent - STATE_TLS_OPEN" appears in the output. Review URL: http://codereview.chromium.org/340007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/sync/notifier/listener/mediator_thread_impl.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
index e4c8061..34026c7 100644
--- a/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
+++ b/chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/sync/notifier/listener/mediator_thread_impl.h"
#include "base/logging.h"
+#include "base/message_loop.h"
#include "base/platform_thread.h"
#include "chrome/browser/sync/engine/net/gaia_authenticator.h"
#include "chrome/browser/sync/notifier/base/async_dns_lookup.h"
@@ -41,6 +42,8 @@ void MediatorThreadImpl::Run() {
PlatformThread::SetName("SyncEngine_MediatorThread");
// For win32, this sets up the win32socketserver. Note that it needs to
// dispatch windows messages since that is what the win32 socket server uses.
+
+ MessageLoop message_loop;
#if defined(OS_WIN)
scoped_ptr<talk_base::SocketServer> socket_server(
new talk_base::Win32SocketServer(this));
@@ -57,10 +60,14 @@ void MediatorThreadImpl::Run() {
if (IsStopping()) {
break;
}
+ MessageLoop::current()->RunAllPending();
}
#endif
- ProcessMessages(talk_base::kForever);
+ do {
+ ProcessMessages(100);
+ MessageLoop::current()->RunAllPending();
+ } while (!IsStopping());
#if defined(OS_WIN)
set_socketserver(old_socket_server);