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

Side by Side Diff: base/synchronization/waitable_event_watcher_posix.cc

Issue 6410105: run iwyu on base! Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: Created 9 years, 10 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 | « base/synchronization/waitable_event_posix.cc ('k') | base/sys_info_mac.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/synchronization/waitable_event_watcher.h" 5 #include <stdbool.h>
6 #include <stddef.h>
6 7
8 #include "base/logging.h"
7 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/ref_counted.h"
8 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
9 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 #include "base/synchronization/waitable_event_watcher.h"
14 #include "base/task.h"
15 #include "base/tracked.h"
10 16
11 namespace base { 17 namespace base {
12 18
13 // ----------------------------------------------------------------------------- 19 // -----------------------------------------------------------------------------
14 // WaitableEventWatcher (async waits). 20 // WaitableEventWatcher (async waits).
15 // 21 //
16 // The basic design is that we add an AsyncWaiter to the wait-list of the event. 22 // The basic design is that we add an AsyncWaiter to the wait-list of the event.
17 // That AsyncWaiter has a pointer to MessageLoop, and a Task to be posted to it. 23 // That AsyncWaiter has a pointer to MessageLoop, and a Task to be posted to it.
18 // The MessageLoop ends up running the task, which calls the delegate. 24 // The MessageLoop ends up running the task, which calls the delegate.
19 // 25 //
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // ----------------------------------------------------------------------------- 277 // -----------------------------------------------------------------------------
272 // This is called when the MessageLoop which the callback will be run it is 278 // This is called when the MessageLoop which the callback will be run it is
273 // deleted. We need to cancel the callback as if we had been deleted, but we 279 // deleted. We need to cancel the callback as if we had been deleted, but we
274 // will still be deleted at some point in the future. 280 // will still be deleted at some point in the future.
275 // ----------------------------------------------------------------------------- 281 // -----------------------------------------------------------------------------
276 void WaitableEventWatcher::WillDestroyCurrentMessageLoop() { 282 void WaitableEventWatcher::WillDestroyCurrentMessageLoop() {
277 StopWatching(); 283 StopWatching();
278 } 284 }
279 285
280 } // namespace base 286 } // namespace base
OLDNEW
« no previous file with comments | « base/synchronization/waitable_event_posix.cc ('k') | base/sys_info_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698