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

Unified Diff: content/common/content_param_traits.cc

Issue 1560553002: Framelet Prototype 2016 Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + Applied Brett's Windows + Fixed security issue Created 4 years, 11 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/common/content_param_traits.h ('k') | content/common/content_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/content_param_traits.cc
diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc
index 0c60380e28184f177473cf582ca7a81ac7c14206..b3e1229391aa0d9288f1c8336cc0ddd2f1365ee0 100644
--- a/content/common/content_param_traits.cc
+++ b/content/common/content_param_traits.cc
@@ -7,57 +7,8 @@
#include <stddef.h>
#include "base/strings/string_number_conversions.h"
-#include "content/common/input/web_input_event_traits.h"
#include "net/base/ip_endpoint.h"
-namespace IPC {
-
-void ParamTraits<WebInputEventPointer>::Write(Message* m, const param_type& p) {
- m->WriteData(reinterpret_cast<const char*>(p), p->size);
-}
-
-bool ParamTraits<WebInputEventPointer>::Read(const Message* m,
- base::PickleIterator* iter,
- param_type* r) {
- const char* data;
- int data_length;
- if (!iter->ReadData(&data, &data_length)) {
- NOTREACHED();
- return false;
- }
- if (data_length < static_cast<int>(sizeof(blink::WebInputEvent))) {
- NOTREACHED();
- return false;
- }
- param_type event = reinterpret_cast<param_type>(data);
- // Check that the data size matches that of the event.
- if (data_length != static_cast<int>(event->size)) {
- NOTREACHED();
- return false;
- }
- const size_t expected_size_for_type =
- content::WebInputEventTraits::GetSize(event->type);
- if (data_length != static_cast<int>(expected_size_for_type)) {
- NOTREACHED();
- return false;
- }
- *r = event;
- return true;
-}
-
-void ParamTraits<WebInputEventPointer>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p->size, l);
- l->append(", ");
- LogParam(p->type, l);
- l->append(", ");
- LogParam(p->timeStampSeconds, l);
- l->append(")");
-}
-
-} // namespace IPC
-
// Generate param traits write methods.
#include "ipc/param_traits_write_macros.h"
namespace IPC {
« no previous file with comments | « content/common/content_param_traits.h ('k') | content/common/content_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698