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

Side by Side Diff: content/child/plugin_param_traits.h

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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file is used to define IPC::ParamTraits<> specializations for a number 5 // This file is used to define IPC::ParamTraits<> specializations for a number
6 // of types so that they can be serialized over IPC. IPC::ParamTraits<> 6 // of types so that they can be serialized over IPC. IPC::ParamTraits<>
7 // specializations for basic types (like int and std::string) and types in the 7 // specializations for basic types (like int and std::string) and types in the
8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains 8 // 'base' project can be found in ipc/ipc_message_utils.h. This file contains
9 // specializations for types that are used by the content code, and which need 9 // specializations for types that are used by the content code, and which need
10 // manual serialization code. This is usually because they're not structs with 10 // manual serialization code. This is usually because they're not structs with
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 NPIdentifier identifier; 62 NPIdentifier identifier;
63 }; 63 };
64 64
65 } // namespace content 65 } // namespace content
66 66
67 namespace IPC { 67 namespace IPC {
68 68
69 template <> 69 template <>
70 struct ParamTraits<content::NPVariant_Param> { 70 struct ParamTraits<content::NPVariant_Param> {
71 typedef content::NPVariant_Param param_type; 71 typedef content::NPVariant_Param param_type;
72 static void Write(Message* m, const param_type& p); 72 static void Write(base::Pickle* m, const param_type& p);
73 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); 73 static bool Read(const base::Pickle* m,
74 base::PickleIterator* iter,
75 param_type* r);
74 static void Log(const param_type& p, std::string* l); 76 static void Log(const param_type& p, std::string* l);
75 }; 77 };
76 78
77 template <> 79 template <>
78 struct ParamTraits<content::NPIdentifier_Param> { 80 struct ParamTraits<content::NPIdentifier_Param> {
79 typedef content::NPIdentifier_Param param_type; 81 typedef content::NPIdentifier_Param param_type;
80 static void Write(Message* m, const param_type& p); 82 static void Write(base::Pickle* m, const param_type& p);
81 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); 83 static bool Read(const base::Pickle* m,
84 base::PickleIterator* iter,
85 param_type* r);
82 static void Log(const param_type& p, std::string* l); 86 static void Log(const param_type& p, std::string* l);
83 }; 87 };
84 88
85 } // namespace IPC 89 } // namespace IPC
86 90
87 #endif // CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_ 91 #endif // CONTENT_CHILD_PLUGIN_PARAM_TRAITS_H_
OLDNEW
« no previous file with comments | « components/network_hints/common/network_hints_messages.cc ('k') | content/child/plugin_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698