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_MESSAGE_LIB_MESSAGE_FILE_H_ | 5 #ifndef TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_H_ |
6 #define TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_H_ | 6 #define TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_H_ |
7 | 7 |
8 #include <memory> | |
9 #include <vector> | |
10 | |
8 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
9 #include "base/macros.h" | 12 #include "base/macros.h" |
10 #include "base/memory/scoped_vector.h" | |
11 #include "ipc/ipc_message.h" | 13 #include "ipc/ipc_message.h" |
12 | 14 |
13 namespace ipc_fuzzer { | 15 namespace ipc_fuzzer { |
14 | 16 |
15 typedef ScopedVector<IPC::Message> MessageVector; | 17 typedef std::vector<std::unique_ptr<IPC::Message>> MessageVector; |
Tom Sepez
2017/07/10 17:45:47
nit: move to |using| while were at it?
Avi (use Gerrit)
2017/07/10 18:44:00
Done.
| |
16 | 18 |
17 class MessageFile { | 19 class MessageFile { |
18 public: | 20 public: |
19 static bool Read(const base::FilePath& path, MessageVector* messages); | 21 static bool Read(const base::FilePath& path, MessageVector* messages); |
20 static bool Write(const base::FilePath& path, const MessageVector& messages); | 22 static bool Write(const base::FilePath& path, const MessageVector& messages); |
21 | 23 |
22 private: | 24 private: |
23 DISALLOW_COPY_AND_ASSIGN(MessageFile); | 25 DISALLOW_COPY_AND_ASSIGN(MessageFile); |
24 }; | 26 }; |
25 | 27 |
26 } // namespace ipc_fuzzer | 28 } // namespace ipc_fuzzer |
27 | 29 |
28 #endif // TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_H_ | 30 #endif // TOOLS_IPC_FUZZER_MESSAGE_LIB_MESSAGE_FILE_H_ |
OLD | NEW |