OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MESSAGE_UTILS_H_ | 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_ |
6 #define IPC_IPC_MESSAGE_UTILS_H_ | 6 #define IPC_IPC_MESSAGE_UTILS_H_ |
7 | 7 |
8 #include <limits.h> | 8 #include <limits.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 #endif // defined(OS_WIN) | 1093 #endif // defined(OS_WIN) |
1094 | 1094 |
1095 //----------------------------------------------------------------------------- | 1095 //----------------------------------------------------------------------------- |
1096 // Generic message subclasses | 1096 // Generic message subclasses |
1097 | 1097 |
1098 // defined in ipc_logging.cc | 1098 // defined in ipc_logging.cc |
1099 IPC_EXPORT void GenerateLogData(const Message& message, | 1099 IPC_EXPORT void GenerateLogData(const Message& message, |
1100 LogData* data, | 1100 LogData* data, |
1101 bool get_params); | 1101 bool get_params); |
1102 | 1102 |
1103 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) | 1103 #if defined(IPC_MESSAGE_LOG_ENABLED) |
1104 inline void AddOutputParamsToLog(const Message* msg, std::string* l) { | 1104 inline void AddOutputParamsToLog(const Message* msg, std::string* l) { |
1105 const std::string& output_params = msg->output_params(); | 1105 const std::string& output_params = msg->output_params(); |
1106 if (!l->empty() && !output_params.empty()) | 1106 if (!l->empty() && !output_params.empty()) |
1107 l->append(", "); | 1107 l->append(", "); |
1108 | 1108 |
1109 l->append(output_params); | 1109 l->append(output_params); |
1110 } | 1110 } |
1111 | 1111 |
1112 template <class ReplyParamType> | 1112 template <class ReplyParamType> |
1113 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, | 1113 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, |
(...skipping 22 matching lines...) Expand all Loading... |
1136 template <class ReplyParamType> | 1136 template <class ReplyParamType> |
1137 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, | 1137 inline void LogReplyParamsToMessage(const ReplyParamType& reply_params, |
1138 const Message* msg) {} | 1138 const Message* msg) {} |
1139 | 1139 |
1140 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} | 1140 inline void ConnectMessageAndReply(const Message* msg, Message* reply) {} |
1141 #endif | 1141 #endif |
1142 | 1142 |
1143 } // namespace IPC | 1143 } // namespace IPC |
1144 | 1144 |
1145 #endif // IPC_IPC_MESSAGE_UTILS_H_ | 1145 #endif // IPC_IPC_MESSAGE_UTILS_H_ |
OLD | NEW |