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

Unified Diff: content/public/common/webkit_param_traits.cc

Issue 9368052: Removed WebTextCheckingResult legacy API use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elimianted ParamTrais<WebString>. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/common/webkit_param_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « content/public/common/webkit_param_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698