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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 3522004: FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/nullable_string16.h" 9 #include "base/nullable_string16.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 void ParamTraits<IPC::ChannelHandle>::Log(const param_type& p, 395 void ParamTraits<IPC::ChannelHandle>::Log(const param_type& p,
396 std::string* l) { 396 std::string* l) {
397 l->append(StringPrintf("ChannelHandle(%s", p.name.c_str())); 397 l->append(StringPrintf("ChannelHandle(%s", p.name.c_str()));
398 #if defined(OS_POSIX) 398 #if defined(OS_POSIX)
399 ParamTraits<base::FileDescriptor>::Log(p.socket, l); 399 ParamTraits<base::FileDescriptor>::Log(p.socket, l);
400 #endif 400 #endif
401 l->append(")"); 401 l->append(")");
402 } 402 }
403 403
404 LogData::LogData() {
405 }
406
407 LogData::~LogData() {
408 }
409
410 void ParamTraits<LogData>::Write(Message* m, const param_type& p) {
411 WriteParam(m, p.channel);
412 WriteParam(m, p.routing_id);
413 WriteParam(m, static_cast<int>(p.type));
414 WriteParam(m, p.flags);
415 WriteParam(m, p.sent);
416 WriteParam(m, p.receive);
417 WriteParam(m, p.dispatch);
418 WriteParam(m, p.params);
419 }
420
421 bool ParamTraits<LogData>::Read(const Message* m, void** iter, param_type* r) {
422 int type;
423 bool result =
424 ReadParam(m, iter, &r->channel) &&
425 ReadParam(m, iter, &r->routing_id) &&
426 ReadParam(m, iter, &type) &&
427 ReadParam(m, iter, &r->flags) &&
428 ReadParam(m, iter, &r->sent) &&
429 ReadParam(m, iter, &r->receive) &&
430 ReadParam(m, iter, &r->dispatch) &&
431 ReadParam(m, iter, &r->params);
432 r->type = static_cast<uint16>(type);
433 return result;
434 }
435
404 } // namespace IPC 436 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698