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

Side by Side Diff: base/message_loop.cc

Issue 1607: Fix purify MLK errors resulting from my previous check-in. The TimerManager... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <mmsystem.h> 10 #include <mmsystem.h>
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DCHECK(!state_); 106 DCHECK(!state_);
107 107
108 // Most tasks that have not been Run() are deleted in the |timer_manager_| 108 // Most tasks that have not been Run() are deleted in the |timer_manager_|
109 // destructor after we remove our tls index. We delete the tasks in our 109 // destructor after we remove our tls index. We delete the tasks in our
110 // queues here so their destuction is similar to the tasks in the 110 // queues here so their destuction is similar to the tasks in the
111 // |timer_manager_|. 111 // |timer_manager_|.
112 DeletePendingTasks(); 112 DeletePendingTasks();
113 ReloadWorkQueue(); 113 ReloadWorkQueue();
114 DeletePendingTasks(); 114 DeletePendingTasks();
115 115
116 // Delete tasks in the delayed work queue.
117 while (!delayed_work_queue_.empty()) {
118 Task* task = delayed_work_queue_.top().task;
119 delayed_work_queue_.pop();
120 delete task;
121 }
122
116 #if defined(OS_WIN) 123 #if defined(OS_WIN)
117 // Match timeBeginPeriod() from construction. 124 // Match timeBeginPeriod() from construction.
118 timeEndPeriod(1); 125 timeEndPeriod(1);
119 #endif 126 #endif
120 } 127 }
121 128
122 void MessageLoop::AddDestructionObserver(DestructionObserver *obs) { 129 void MessageLoop::AddDestructionObserver(DestructionObserver *obs) {
123 DCHECK(this == current()); 130 DCHECK(this == current());
124 destruction_observers_.AddObserver(obs); 131 destruction_observers_.AddObserver(obs);
125 } 132 }
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 //------------------------------------------------------------------------------ 550 //------------------------------------------------------------------------------
544 // MessageLoopForIO 551 // MessageLoopForIO
545 552
546 #if defined(OS_WIN) 553 #if defined(OS_WIN)
547 554
548 void MessageLoopForIO::WatchObject(HANDLE object, Watcher* watcher) { 555 void MessageLoopForIO::WatchObject(HANDLE object, Watcher* watcher) {
549 pump_win()->WatchObject(object, watcher); 556 pump_win()->WatchObject(object, watcher);
550 } 557 }
551 558
552 #endif // defined(OS_WIN) 559 #endif // defined(OS_WIN)
OLDNEW
« 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