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

Side by Side Diff: content/common/content_param_traits.cc

Issue 1154283003: Change most uses of Pickle to base::Pickle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « content/common/common_param_traits_unittest.cc ('k') | content/common/cursors/webcursor.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/content_param_traits.h" 5 #include "content/common/content_param_traits.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "content/common/input/web_input_event_traits.h" 8 #include "content/common/input/web_input_event_traits.h"
9 #include "net/base/ip_endpoint.h" 9 #include "net/base/ip_endpoint.h"
10 10
11 namespace IPC { 11 namespace IPC {
12 12
13 void ParamTraits<WebInputEventPointer>::Write(Message* m, const param_type& p) { 13 void ParamTraits<WebInputEventPointer>::Write(Message* m, const param_type& p) {
14 m->WriteData(reinterpret_cast<const char*>(p), p->size); 14 m->WriteData(reinterpret_cast<const char*>(p), p->size);
15 } 15 }
16 16
17 bool ParamTraits<WebInputEventPointer>::Read(const Message* m, 17 bool ParamTraits<WebInputEventPointer>::Read(const Message* m,
18 PickleIterator* iter, 18 base::PickleIterator* iter,
19 param_type* r) { 19 param_type* r) {
20 const char* data; 20 const char* data;
21 int data_length; 21 int data_length;
22 if (!iter->ReadData(&data, &data_length)) { 22 if (!iter->ReadData(&data, &data_length)) {
23 NOTREACHED(); 23 NOTREACHED();
24 return false; 24 return false;
25 } 25 }
26 if (data_length < static_cast<int>(sizeof(blink::WebInputEvent))) { 26 if (data_length < static_cast<int>(sizeof(blink::WebInputEvent))) {
27 NOTREACHED(); 27 NOTREACHED();
28 return false; 28 return false;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ 69 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_
70 #include "content/common/content_param_traits_macros.h" 70 #include "content/common/content_param_traits_macros.h"
71 } // namespace IPC 71 } // namespace IPC
72 72
73 // Generate param traits log methods. 73 // Generate param traits log methods.
74 #include "ipc/param_traits_log_macros.h" 74 #include "ipc/param_traits_log_macros.h"
75 namespace IPC { 75 namespace IPC {
76 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ 76 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_
77 #include "content/common/content_param_traits_macros.h" 77 #include "content/common/content_param_traits_macros.h"
78 } // namespace IPC 78 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/common_param_traits_unittest.cc ('k') | content/common/cursors/webcursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698