| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> |
| 11 |
| 10 #include "base/macros.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 13 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
| 14 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 15 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
| 16 #include "ipc/ipc_channel_proxy.h" | 17 #include "ipc/ipc_channel_proxy.h" |
| 17 #include "ipc/ipc_listener.h" | 18 #include "ipc/ipc_listener.h" |
| 18 #include "ipc/ipc_message.h" | 19 #include "ipc/ipc_message.h" |
| 19 #include "ipc/mojo/scoped_ipc_support.h" | 20 #include "ipc/mojo/scoped_ipc_support.h" |
| 20 #include "tools/ipc_fuzzer/message_lib/message_file.h" | 21 #include "tools/ipc_fuzzer/message_lib/message_file.h" |
| 21 | 22 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 40 // Send messages to the browser. | 41 // Send messages to the browser. |
| 41 void Run(); | 42 void Run(); |
| 42 | 43 |
| 43 // IPC::Listener implementation. | 44 // IPC::Listener implementation. |
| 44 bool OnMessageReceived(const IPC::Message& message) override; | 45 bool OnMessageReceived(const IPC::Message& message) override; |
| 45 void OnChannelError() override; | 46 void OnChannelError() override; |
| 46 | 47 |
| 47 private: | 48 private: |
| 48 void SendNextMessage(); | 49 void SendNextMessage(); |
| 49 | 50 |
| 50 scoped_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_; | 51 std::unique_ptr<IPC::ScopedIPCSupport> mojo_ipc_support_; |
| 51 scoped_ptr<IPC::ChannelProxy> channel_; | 52 std::unique_ptr<IPC::ChannelProxy> channel_; |
| 52 base::MessageLoop main_loop_; | 53 base::MessageLoop main_loop_; |
| 53 base::Thread io_thread_; | 54 base::Thread io_thread_; |
| 54 base::WaitableEvent shutdown_event_; | 55 base::WaitableEvent shutdown_event_; |
| 55 scoped_ptr<base::Timer> timer_; | 56 std::unique_ptr<base::Timer> timer_; |
| 56 MessageVector messages_; | 57 MessageVector messages_; |
| 57 size_t message_index_; | 58 size_t message_index_; |
| 58 | 59 |
| 59 DISALLOW_COPY_AND_ASSIGN(ReplayProcess); | 60 DISALLOW_COPY_AND_ASSIGN(ReplayProcess); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace ipc_fuzzer | 63 } // namespace ipc_fuzzer |
| 63 | 64 |
| 64 #endif // TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ | 65 #endif // TOOLS_IPC_FUZZER_REPLAY_REPLAY_PROCESS_H_ |
| OLD | NEW |