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 #include "ipc/ipc_message_utils.h" | 5 #include "ipc/ipc_message_utils.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/nullable_string16.h" | 10 #include "base/nullable_string16.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 : routing_id(0), | 249 : routing_id(0), |
250 type(0), | 250 type(0), |
251 sent(0), | 251 sent(0), |
252 receive(0), | 252 receive(0), |
253 dispatch(0) { | 253 dispatch(0) { |
254 } | 254 } |
255 | 255 |
256 LogData::~LogData() { | 256 LogData::~LogData() { |
257 } | 257 } |
258 | 258 |
259 MessageIterator::MessageIterator(const Message& m) : iter_(m) { | |
260 } | |
261 | |
262 int MessageIterator::NextInt() const { | |
263 int val = -1; | |
264 if (!iter_.ReadInt(&val)) | |
265 NOTREACHED(); | |
266 return val; | |
267 } | |
268 | |
269 const std::string MessageIterator::NextString() const { | |
270 std::string val; | |
271 if (!iter_.ReadString(&val)) | |
272 NOTREACHED(); | |
273 return val; | |
274 } | |
275 | |
276 void ParamTraits<bool>::Log(const param_type& p, std::string* l) { | 259 void ParamTraits<bool>::Log(const param_type& p, std::string* l) { |
277 l->append(p ? "true" : "false"); | 260 l->append(p ? "true" : "false"); |
278 } | 261 } |
279 | 262 |
280 void ParamTraits<int>::Log(const param_type& p, std::string* l) { | 263 void ParamTraits<int>::Log(const param_type& p, std::string* l) { |
281 l->append(base::IntToString(p)); | 264 l->append(base::IntToString(p)); |
282 } | 265 } |
283 | 266 |
284 void ParamTraits<unsigned int>::Log(const param_type& p, std::string* l) { | 267 void ParamTraits<unsigned int>::Log(const param_type& p, std::string* l) { |
285 l->append(base::UintToString(p)); | 268 l->append(base::UintToString(p)); |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 return result; | 828 return result; |
846 } | 829 } |
847 | 830 |
848 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { | 831 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { |
849 l->append("<MSG>"); | 832 l->append("<MSG>"); |
850 } | 833 } |
851 | 834 |
852 #endif // OS_WIN | 835 #endif // OS_WIN |
853 | 836 |
854 } // namespace IPC | 837 } // namespace IPC |
OLD | NEW |