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

Unified Diff: chrome/browser/sync/notifier/listener/mediator_thread_impl.cc

Issue 340007: Run a Chrome message loop on the mediator thread, allowing certificates to be... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
===================================================================
--- chrome/browser/sync/notifier/listener/mediator_thread_impl.cc (revision 30214)
+++ chrome/browser/sync/notifier/listener/mediator_thread_impl.cc (working copy)
@@ -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 @@
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 @@
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698