OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ | 5 #ifndef TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ |
6 #define TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ | 6 #define TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 void OpenChannel(); | 30 void OpenChannel(); |
31 | 31 |
32 // Extract messages from a file specified by --ipc-fuzzer-testcase= | 32 // Extract messages from a file specified by --ipc-fuzzer-testcase= |
33 // Returns true on success, false otherwise. | 33 // Returns true on success, false otherwise. |
34 bool OpenTestcase(); | 34 bool OpenTestcase(); |
35 | 35 |
36 // Send messages to the browser. | 36 // Send messages to the browser. |
37 void Run(); | 37 void Run(); |
38 | 38 |
39 // IPC::Listener implementation. | 39 // IPC::Listener implementation. |
40 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 40 virtual bool OnMessageReceived(const IPC::Message& message) override; |
41 virtual void OnChannelError() OVERRIDE; | 41 virtual void OnChannelError() override; |
42 | 42 |
43 private: | 43 private: |
44 void SendNextMessage(); | 44 void SendNextMessage(); |
45 | 45 |
46 scoped_ptr<IPC::ChannelProxy> channel_; | 46 scoped_ptr<IPC::ChannelProxy> channel_; |
47 base::MessageLoop main_loop_; | 47 base::MessageLoop main_loop_; |
48 base::Thread io_thread_; | 48 base::Thread io_thread_; |
49 base::WaitableEvent shutdown_event_; | 49 base::WaitableEvent shutdown_event_; |
50 scoped_ptr<base::Timer> timer_; | 50 scoped_ptr<base::Timer> timer_; |
51 MessageVector messages_; | 51 MessageVector messages_; |
52 size_t message_index_; | 52 size_t message_index_; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(ReplayProcess); | 54 DISALLOW_COPY_AND_ASSIGN(ReplayProcess); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace ipc_fuzzer | 57 } // namespace ipc_fuzzer |
58 | 58 |
59 #endif // TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ | 59 #endif // TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ |
OLD | NEW |