Chromium Code Reviews| Index: content/public/common/webkit_param_traits.cc |
| diff --git a/content/public/common/webkit_param_traits.cc b/content/public/common/webkit_param_traits.cc |
| index 5d4e059b18237dc3fde13da9e15d66514854e503..aff36ece589455a83a3276e2477bc07cb6de343d 100644 |
| --- a/content/public/common/webkit_param_traits.cc |
| +++ b/content/public/common/webkit_param_traits.cc |
| @@ -310,6 +310,40 @@ void ParamTraits<webkit::WebPluginInfo>::Log(const param_type& p, |
| l->append(")"); |
| } |
| +void ParamTraits<WebKit::WebTextCheckingResult>::Write(Message* m, |
| + const param_type& p) { |
| + WriteParam(m, p.type); |
| + WriteParam(m, p.location); |
| + WriteParam(m, p.length); |
| + WriteParam(m, static_cast<string16>(p.replacement)); |
| +} |
| + |
| +bool ParamTraits<WebKit::WebTextCheckingResult>::Read(const Message* m, |
| + void** iter, |
| + param_type* p) { |
| + bool ok = |
| + ReadParam(m, iter, &p->type) && |
| + ReadParam(m, iter, &p->location) && |
| + ReadParam(m, iter, &p->length); |
| + if (!ok) |
| + return false; |
| + string16 replacement; |
| + if (!ReadParam(m, iter, &replacement)) |
| + return false; |
| + p->replacement.assign(replacement); |
|
darin (slow to review)
2012/02/15 05:54:26
I don't think we want this. It means creating a W
|
| + return true; |
| +} |
| + |
| +void ParamTraits<WebKit::WebTextCheckingResult>::Log(const param_type& p, |
| + std::string* l) { |
| + l->append("("); |
| + LogParam(p.type, l); l->append(", "); |
| + LogParam(p.location, l); l->append(", "); |
| + LogParam(p.length, l); l->append(", "); |
| + LogParam(static_cast<string16>(p.replacement), l); l->append(", "); |
| + l->append(")"); |
| +} |
| + |
| void ParamTraits<webkit::forms::PasswordForm>::Write(Message* m, |
| const param_type& p) { |
| WriteParam(m, p.signon_realm); |