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

Side by Side Diff: ipc/mach_port_mac.cc

Issue 1966983003: Generate param traits size methods for IPC files in content/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix owners Created 4 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/mach_port_mac.h ('k') | media/gpu/ipc/common/media_param_traits.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mach_port_mac.h" 5 #include "ipc/mach_port_mac.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "ipc/mach_port_attachment_mac.h" 10 #include "ipc/mach_port_attachment_mac.h"
11 11
12 namespace IPC { 12 namespace IPC {
13 13
14 // static 14 // static
15 void ParamTraits<MachPortMac>::GetSize(base::PickleSizer* s,
16 const param_type& p) {
17 s->AddAttachment();
18 }
19
20 // static
15 void ParamTraits<MachPortMac>::Write(base::Pickle* m, const param_type& p) { 21 void ParamTraits<MachPortMac>::Write(base::Pickle* m, const param_type& p) {
16 if (!m->WriteAttachment( 22 if (!m->WriteAttachment(
17 new IPC::internal::MachPortAttachmentMac(p.get_mach_port()))) { 23 new IPC::internal::MachPortAttachmentMac(p.get_mach_port()))) {
18 NOTREACHED(); 24 NOTREACHED();
19 } 25 }
20 } 26 }
21 27
22 // static 28 // static
23 bool ParamTraits<MachPortMac>::Read(const base::Pickle* m, 29 bool ParamTraits<MachPortMac>::Read(const base::Pickle* m,
24 base::PickleIterator* iter, 30 base::PickleIterator* iter,
(...skipping 17 matching lines...) Expand all
42 mach_port_attachment->reset_mach_port_ownership(); 48 mach_port_attachment->reset_mach_port_ownership();
43 return true; 49 return true;
44 } 50 }
45 51
46 // static 52 // static
47 void ParamTraits<MachPortMac>::Log(const param_type& p, std::string* l) { 53 void ParamTraits<MachPortMac>::Log(const param_type& p, std::string* l) {
48 l->append(base::StringPrintf("mach port: 0x%X", p.get_mach_port())); 54 l->append(base::StringPrintf("mach port: 0x%X", p.get_mach_port()));
49 } 55 }
50 56
51 } // namespace IPC 57 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/mach_port_mac.h ('k') | media/gpu/ipc/common/media_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698