| OLD | NEW |
| 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 #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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 receive(0), | 465 receive(0), |
| 466 dispatch(0) { | 466 dispatch(0) { |
| 467 } | 467 } |
| 468 | 468 |
| 469 LogData::~LogData() { | 469 LogData::~LogData() { |
| 470 } | 470 } |
| 471 | 471 |
| 472 void ParamTraits<LogData>::Write(Message* m, const param_type& p) { | 472 void ParamTraits<LogData>::Write(Message* m, const param_type& p) { |
| 473 WriteParam(m, p.channel); | 473 WriteParam(m, p.channel); |
| 474 WriteParam(m, p.routing_id); | 474 WriteParam(m, p.routing_id); |
| 475 WriteParam(m, static_cast<int>(p.type)); | 475 WriteParam(m, p.type); |
| 476 WriteParam(m, p.flags); | 476 WriteParam(m, p.flags); |
| 477 WriteParam(m, p.sent); | 477 WriteParam(m, p.sent); |
| 478 WriteParam(m, p.receive); | 478 WriteParam(m, p.receive); |
| 479 WriteParam(m, p.dispatch); | 479 WriteParam(m, p.dispatch); |
| 480 WriteParam(m, p.params); | 480 WriteParam(m, p.params); |
| 481 } | 481 } |
| 482 | 482 |
| 483 bool ParamTraits<LogData>::Read(const Message* m, void** iter, param_type* r) { | 483 bool ParamTraits<LogData>::Read(const Message* m, void** iter, param_type* r) { |
| 484 int type = -1; | 484 return |
| 485 bool result = | |
| 486 ReadParam(m, iter, &r->channel) && | 485 ReadParam(m, iter, &r->channel) && |
| 487 ReadParam(m, iter, &r->routing_id) && | 486 ReadParam(m, iter, &r->routing_id) && |
| 488 ReadParam(m, iter, &type) && | 487 ReadParam(m, iter, &r->type) && |
| 489 ReadParam(m, iter, &r->flags) && | 488 ReadParam(m, iter, &r->flags) && |
| 490 ReadParam(m, iter, &r->sent) && | 489 ReadParam(m, iter, &r->sent) && |
| 491 ReadParam(m, iter, &r->receive) && | 490 ReadParam(m, iter, &r->receive) && |
| 492 ReadParam(m, iter, &r->dispatch) && | 491 ReadParam(m, iter, &r->dispatch) && |
| 493 ReadParam(m, iter, &r->params); | 492 ReadParam(m, iter, &r->params); |
| 494 r->type = static_cast<uint16>(type); | |
| 495 return result; | |
| 496 } | 493 } |
| 497 | 494 |
| 498 } // namespace IPC | 495 } // namespace IPC |
| OLD | NEW |