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

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

Issue 391027: Fix mediator_thread_impl.cc to run timer tasks when the task runner is... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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
Index: chrome/browser/sync/notifier/listener/mediator_thread_impl.cc
===================================================================
--- chrome/browser/sync/notifier/listener/mediator_thread_impl.cc (revision 31519)
+++ chrome/browser/sync/notifier/listener/mediator_thread_impl.cc (working copy)
@@ -53,19 +53,20 @@
// Since we just changed the socket server, ensure that any queued up
// messages are processed.
socket_server->WakeUp();
- ::MSG message;
- while (::GetMessage(&message, NULL, 0, 0)) {
- ::TranslateMessage(&message);
- ::DispatchMessage(&message);
- if (IsStopping()) {
- break;
- }
- MessageLoop::current()->RunAllPending();
- }
#endif
do {
+#if defined(OS_WIN)
+ ::MSG message;
+ if (::PeekMessage(&message, NULL, 0, 0, PM_REMOVE)) {
+ ::TranslateMessage(&message);
+ ::DispatchMessage(&message);
+ }
+#endif
ProcessMessages(100);
+ if (pump_.get() && pump_->HasPendingTimeoutTask()) {
+ pump_->WakeTasks();
+ }
MessageLoop::current()->RunAllPending();
} while (!IsStopping());
« no previous file with comments | « no previous file | third_party/libjingle/files/talk/base/taskrunner.h » ('j') | third_party/libjingle/files/talk/base/taskrunner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698