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

Side by Side Diff: chrome/common/cast_messages.cc

Issue 1659003003: IPC::Message -> base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more mac fix Created 4 years, 10 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 | « chrome/common/cast_messages.h ('k') | chrome/common/content_settings_pattern_serializer.h » ('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 "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
OLDNEW
« no previous file with comments | « chrome/common/cast_messages.h ('k') | chrome/common/content_settings_pattern_serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698