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

Side by Side Diff: tools/ipc_fuzzer/message_lib/message_names.cc

Issue 105083002: IPC fuzzer: create message_lib library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename map_ to mapped_file_. Created 7 years 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "tools/ipc_fuzzer/message_lib/message_names.h"
6 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
7
8 #include "ipc/ipc_message_null_macros.h"
9 #undef IPC_MESSAGE_DECL
10 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \
11 names.Add(static_cast<uint32>(name::ID), #name);
12
13 void PopulateIpcMessageNames(ipc_fuzzer::MessageNames& names) {
14 #include "tools/ipc_fuzzer/message_lib/all_messages.h"
15 }
16
17 namespace ipc_fuzzer {
18
19 MessageNames* MessageNames::all_names_;
Tom Sepez 2013/12/06 18:57:16 Explicit init to NULL nit: prior line comment as /
aedla 2013/12/09 18:08:32 Done.
20
21 MessageNames::MessageNames() {
22 }
23
24 MessageNames::~MessageNames() {
25 }
26
27 MessageNames& MessageNames::Get() {
Tom Sepez 2013/12/06 18:57:16 nit: prior line comment as // static
aedla 2013/12/09 18:08:32 Done.
28 if (!all_names_) {
29 all_names_ = new MessageNames();
30 PopulateIpcMessageNames(*all_names_);
31 }
32 return *all_names_;
33 }
34
35 } // namespace ipc_fuzzer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698