OLD | NEW |
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/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
10 #include "webkit/glue/npruntime_util.h" | 10 #include "webkit/glue/npruntime_util.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 (r->type == content::NPVARIANT_PARAM_NULL)) { | 122 (r->type == content::NPVARIANT_PARAM_NULL)) { |
123 result = true; | 123 result = true; |
124 } else { | 124 } else { |
125 NOTREACHED(); | 125 NOTREACHED(); |
126 } | 126 } |
127 | 127 |
128 return result; | 128 return result; |
129 } | 129 } |
130 | 130 |
131 void ParamTraits<NPVariant_Param>::Log(const param_type& p, std::string* l) { | 131 void ParamTraits<NPVariant_Param>::Log(const param_type& p, std::string* l) { |
132 l->append(StringPrintf("NPVariant_Param(%d, ", static_cast<int>(p.type))); | 132 l->append( |
| 133 base::StringPrintf("NPVariant_Param(%d, ", static_cast<int>(p.type))); |
133 if (p.type == content::NPVARIANT_PARAM_BOOL) { | 134 if (p.type == content::NPVARIANT_PARAM_BOOL) { |
134 LogParam(p.bool_value, l); | 135 LogParam(p.bool_value, l); |
135 } else if (p.type == content::NPVARIANT_PARAM_INT) { | 136 } else if (p.type == content::NPVARIANT_PARAM_INT) { |
136 LogParam(p.int_value, l); | 137 LogParam(p.int_value, l); |
137 } else if (p.type == content::NPVARIANT_PARAM_DOUBLE) { | 138 } else if (p.type == content::NPVARIANT_PARAM_DOUBLE) { |
138 LogParam(p.double_value, l); | 139 LogParam(p.double_value, l); |
139 } else if (p.type == content::NPVARIANT_PARAM_STRING) { | 140 } else if (p.type == content::NPVARIANT_PARAM_STRING) { |
140 LogParam(p.string_value, l); | 141 LogParam(p.string_value, l); |
141 } else if (p.type == content::NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || | 142 } else if (p.type == content::NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || |
142 p.type == content::NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { | 143 p.type == content::NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ | 246 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ |
246 #include "content/common/content_param_traits_macros.h" | 247 #include "content/common/content_param_traits_macros.h" |
247 } // namespace IPC | 248 } // namespace IPC |
248 | 249 |
249 // Generate param traits log methods. | 250 // Generate param traits log methods. |
250 #include "ipc/param_traits_log_macros.h" | 251 #include "ipc/param_traits_log_macros.h" |
251 namespace IPC { | 252 namespace IPC { |
252 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ | 253 #undef CONTENT_COMMON_CONTENT_PARAM_TRAITS_MACROS_H_ |
253 #include "content/common/content_param_traits_macros.h" | 254 #include "content/common/content_param_traits_macros.h" |
254 } // namespace IPC | 255 } // namespace IPC |
OLD | NEW |