Index: chrome/common/render_messages.cc |
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc |
index e3aec79406b5e7165265b449e4e6522862ae7517..cb139592bbf3135e1447173ffc4fb7276c0010cf 100644 |
--- a/chrome/common/render_messages.cc |
+++ b/chrome/common/render_messages.cc |
@@ -8,8 +8,7 @@ |
#include "chrome/common/edit_command.h" |
#include "chrome/common/extensions/extension_extent.h" |
#include "chrome/common/extensions/url_pattern.h" |
-#include "chrome/common/indexed_db_key.h" |
-#include "chrome/common/serialized_script_value.h" |
+#include "chrome/common/indexed_db_param_traits.h" |
#include "chrome/common/thumbnail_score.h" |
#include "gfx/rect.h" |
#include "ipc/ipc_channel_handle.h" |
@@ -377,86 +376,6 @@ void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Log( |
l->append(L"<HttpResponseHeaders>"); |
} |
-void ParamTraits<SerializedScriptValue>::Write(Message* m, const param_type& p) { |
- WriteParam(m, p.is_null()); |
- WriteParam(m, p.is_invalid()); |
- WriteParam(m, p.data()); |
-} |
- |
-bool ParamTraits<SerializedScriptValue>::Read(const Message* m, void** iter, |
- param_type* r) { |
- bool is_null; |
- bool is_invalid; |
- string16 data; |
- bool ok = |
- ReadParam(m, iter, &is_null) && |
- ReadParam(m, iter, &is_invalid) && |
- ReadParam(m, iter, &data); |
- if (!ok) |
- return false; |
- r->set_is_null(is_null); |
- r->set_is_invalid(is_invalid); |
- r->set_data(data); |
- return true; |
-} |
- |
-void ParamTraits<SerializedScriptValue>::Log(const param_type& p, |
- std::wstring* l) { |
- l->append(L"<SerializedScriptValue>("); |
- LogParam(p.is_null(), l); |
- l->append(L", "); |
- LogParam(p.is_invalid(), l); |
- l->append(L", "); |
- LogParam(p.data(), l); |
- l->append(L")"); |
-} |
- |
-void ParamTraits<IndexedDBKey>::Write(Message* m, const param_type& p) { |
- WriteParam(m, int(p.type())); |
- // TODO(jorlow): Technically, we only need to pack the type being used. |
- WriteParam(m, p.string()); |
- WriteParam(m, p.number()); |
-} |
- |
-bool ParamTraits<IndexedDBKey>::Read(const Message* m, void** iter, |
- param_type* r) { |
- int type; |
- string16 string; |
- int32 number; |
- bool ok = |
- ReadParam(m, iter, &type) && |
- ReadParam(m, iter, &string) && |
- ReadParam(m, iter, &number); |
- if (!ok) |
- return false; |
- switch (type) { |
- case WebKit::WebIDBKey::NullType: |
- r->SetNull(); |
- return true; |
- case WebKit::WebIDBKey::StringType: |
- r->Set(string); |
- return true; |
- case WebKit::WebIDBKey::NumberType: |
- r->Set(number); |
- return true; |
- case WebKit::WebIDBKey::InvalidType: |
- r->SetInvalid(); |
- return true; |
- } |
- NOTREACHED(); |
- return false; |
-} |
- |
-void ParamTraits<IndexedDBKey>::Log(const param_type& p, std::wstring* l) { |
- l->append(L"<IndexedDBKey>("); |
- LogParam(int(p.type()), l); |
- l->append(L", "); |
- LogParam(p.string(), l); |
- l->append(L", "); |
- LogParam(p.number(), l); |
- l->append(L")"); |
-} |
- |
void ParamTraits<webkit_glue::FormData>::Write(Message* m, |
const param_type& p) { |
WriteParam(m, p.name); |