OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/common/common_param_traits.h" | 5 #include "chrome/common/common_param_traits.h" |
6 | 6 |
7 #define IPC_MESSAGE_IMPL | 7 #define IPC_MESSAGE_IMPL |
8 #include "chrome/common/pepper_file_messages.h" | 8 #include "chrome/common/pepper_file_messages.h" |
9 | 9 |
10 namespace IPC { | 10 namespace IPC { |
11 | 11 |
12 void ParamTraits<PepperDirEntry>::Write(Message* m, const param_type& p) { | 12 void ParamTraits<webkit::ppapi::DirEntry>::Write(Message* m, |
| 13 const param_type& p) { |
13 WriteParam(m, p.name); | 14 WriteParam(m, p.name); |
14 WriteParam(m, p.is_dir); | 15 WriteParam(m, p.is_dir); |
15 } | 16 } |
16 | 17 |
17 bool ParamTraits<PepperDirEntry>::Read(const Message* m, | 18 bool ParamTraits<webkit::ppapi::DirEntry>::Read(const Message* m, |
18 void** iter, | 19 void** iter, |
19 param_type* p) { | 20 param_type* p) { |
20 return ReadParam(m, iter, &p->name) && | 21 return ReadParam(m, iter, &p->name) && |
21 ReadParam(m, iter, &p->is_dir); | 22 ReadParam(m, iter, &p->is_dir); |
22 } | 23 } |
23 | 24 |
24 void ParamTraits<PepperDirEntry>::Log(const param_type& p, std::string* l) { | 25 void ParamTraits<webkit::ppapi::DirEntry>::Log(const param_type& p, |
| 26 std::string* l) { |
25 l->append("("); | 27 l->append("("); |
26 LogParam(p.name, l); | 28 LogParam(p.name, l); |
27 l->append(", "); | 29 l->append(", "); |
28 LogParam(p.is_dir, l); | 30 LogParam(p.is_dir, l); |
29 l->append(")"); | 31 l->append(")"); |
30 } | 32 } |
31 | 33 |
32 } // namespace IPC | 34 } // namespace IPC |
OLD | NEW |