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

Side by Side Diff: ipc/ipc_sync_message_filter.h

Issue 1261253002: Add waitable event for SyncMessageFilter init (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sender_ check Created 5 years, 4 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
« no previous file with comments | « no previous file | ipc/ipc_sync_message_filter.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef IPC_IPC_SYNC_MESSAGE_FILTER_H_ 5 #ifndef IPC_IPC_SYNC_MESSAGE_FILTER_H_
6 #define IPC_IPC_SYNC_MESSAGE_FILTER_H_ 6 #define IPC_IPC_SYNC_MESSAGE_FILTER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_vector.h"
12 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
13 #include "ipc/ipc_sender.h" 14 #include "ipc/ipc_sender.h"
14 #include "ipc/ipc_sync_message.h" 15 #include "ipc/ipc_sync_message.h"
15 #include "ipc/message_filter.h" 16 #include "ipc/message_filter.h"
16 17
17 namespace base { 18 namespace base {
18 class SingleThreadTaskRunner; 19 class SingleThreadTaskRunner;
19 class WaitableEvent; 20 class WaitableEvent;
20 } 21 }
21 22
(...skipping 30 matching lines...) Expand all
52 53
53 // The process's main thread. 54 // The process's main thread.
54 scoped_refptr<base::SingleThreadTaskRunner> listener_task_runner_; 55 scoped_refptr<base::SingleThreadTaskRunner> listener_task_runner_;
55 56
56 // The message loop where the Channel lives. 57 // The message loop where the Channel lives.
57 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 58 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
58 59
59 typedef std::set<PendingSyncMsg*> PendingSyncMessages; 60 typedef std::set<PendingSyncMsg*> PendingSyncMessages;
60 PendingSyncMessages pending_sync_messages_; 61 PendingSyncMessages pending_sync_messages_;
61 62
63 // Messages waiting to be delivered after IO initialization.
64 ScopedVector<Message> pending_messages_;
65
62 // Locks data members above. 66 // Locks data members above.
63 base::Lock lock_; 67 base::Lock lock_;
64 68
65 base::WaitableEvent* shutdown_event_; 69 base::WaitableEvent* shutdown_event_;
66 70
67 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter); 71 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter);
68 }; 72 };
69 73
70 } // namespace IPC 74 } // namespace IPC
71 75
72 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_ 76 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_sync_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698