OLD | NEW |
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 "chrome/common/cast_messages.h" | 5 #include "chrome/common/cast_messages.h" |
6 | 6 |
7 namespace IPC { | 7 namespace IPC { |
8 | 8 |
9 void ParamTraits<media::cast::RtpTimeTicks>::Write(Message* m, | 9 void ParamTraits<media::cast::RtpTimeTicks>::Write(base::Pickle* m, |
10 const param_type& p) { | 10 const param_type& p) { |
11 ParamTraits<uint64_t>::Write(m, p.SerializeForIPC()); | 11 ParamTraits<uint64_t>::Write(m, p.SerializeForIPC()); |
12 } | 12 } |
13 | 13 |
14 bool ParamTraits<media::cast::RtpTimeTicks>::Read( | 14 bool ParamTraits<media::cast::RtpTimeTicks>::Read(const base::Pickle* m, |
15 const Message* m, base::PickleIterator* iter, param_type* r) { | 15 base::PickleIterator* iter, |
| 16 param_type* r) { |
16 uint64_t serialized = UINT64_C(0); | 17 uint64_t serialized = UINT64_C(0); |
17 if (ParamTraits<uint64_t>::Read(m, iter, &serialized)) { | 18 if (ParamTraits<uint64_t>::Read(m, iter, &serialized)) { |
18 *r = param_type::DeserializeForIPC(serialized); | 19 *r = param_type::DeserializeForIPC(serialized); |
19 return true; | 20 return true; |
20 } | 21 } |
21 return false; | 22 return false; |
22 } | 23 } |
23 | 24 |
24 void ParamTraits<media::cast::RtpTimeTicks>::Log(const param_type& p, | 25 void ParamTraits<media::cast::RtpTimeTicks>::Log(const param_type& p, |
25 std::string* l) { | 26 std::string* l) { |
26 std::ostringstream oss; | 27 std::ostringstream oss; |
27 oss << p; | 28 oss << p; |
28 l->append(oss.str()); | 29 l->append(oss.str()); |
29 } | 30 } |
30 | 31 |
31 } // namespace IPC | 32 } // namespace IPC |
OLD | NEW |