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

Side by Side Diff: ipc/ipc_logging.h

Issue 2847003005: Reland "Add enable_ipc_logging build argument" (Closed)
Patch Set: Reland "Add enable_ipc_logging build argument" Created 3 years, 7 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 | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_logging.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_LOGGING_H_ 5 #ifndef IPC_IPC_LOGGING_H_
6 #define IPC_IPC_LOGGING_H_ 6 #define IPC_IPC_LOGGING_H_
7 7
8 #include "ipc/ipc_features.h"
9
10 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
11
8 #include <stdint.h> 12 #include <stdint.h>
9
10 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
11
12 #ifdef IPC_MESSAGE_LOG_ENABLED
13
14 #include <vector> 13 #include <vector>
15 14
16 #include "base/containers/hash_tables.h" 15 #include "base/containers/hash_tables.h"
17 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
18 #include "base/memory/singleton.h" 17 #include "base/memory/singleton.h"
19 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
20 #include "ipc/ipc_export.h" 19 #include "ipc/ipc_export.h"
20 #include "ipc/ipc_message.h"
21 21
22 // Logging function. |name| is a string in ASCII and |params| is a string in 22 // Logging function. |name| is a string in ASCII and |params| is a string in
23 // UTF-8. 23 // UTF-8.
24 typedef void (*LogFunction)(std::string* name, 24 typedef void (*LogFunction)(std::string* name,
25 const IPC::Message* msg, 25 const IPC::Message* msg,
26 std::string* params); 26 std::string* params);
27 27
28 typedef base::hash_map<uint32_t, LogFunction > LogFunctionMap; 28 typedef base::hash_map<uint32_t, LogFunction > LogFunctionMap;
29 29
30 namespace IPC { 30 namespace IPC {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 Sender* sender_; 116 Sender* sender_;
117 scoped_refptr<base::SingleThreadTaskRunner> main_thread_; 117 scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
118 118
119 Consumer* consumer_; 119 Consumer* consumer_;
120 120
121 static LogFunctionMap* log_function_map_; 121 static LogFunctionMap* log_function_map_;
122 }; 122 };
123 123
124 } // namespace IPC 124 } // namespace IPC
125 125
126 #endif // IPC_MESSAGE_LOG_ENABLED 126 #endif // BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
127 127
128 #endif // IPC_IPC_LOGGING_H_ 128 #endif // IPC_IPC_LOGGING_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698