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

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

Issue 1966983003: Generate param traits size methods for IPC files in content/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix owners Created 4 years, 7 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/common_param_traits.h ('k') | device/bluetooth/bluetooth_uuid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/common_param_traits.cc
diff --git a/content/public/common/common_param_traits.cc b/content/public/common/common_param_traits.cc
index 641ac26d0a7421d24ca6b544e733d6cafe9ce78e..3fcfdda02de585798129621632ded831b39508b0 100644
--- a/content/public/common/common_param_traits.cc
+++ b/content/public/common/common_param_traits.cc
@@ -15,6 +15,14 @@
namespace IPC {
+void ParamTraits<url::Origin>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, p.unique());
+ GetParamSize(s, p.scheme());
+ GetParamSize(s, p.host());
+ GetParamSize(s, p.port());
+}
+
void ParamTraits<url::Origin>::Write(base::Pickle* m, const url::Origin& p) {
WriteParam(m, p.unique());
WriteParam(m, p.scheme());
@@ -52,6 +60,12 @@ void ParamTraits<url::Origin>::Log(const url::Origin& p, std::string* l) {
l->append(p.Serialize());
}
+void ParamTraits<net::HostPortPair>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, p.host());
+ GetParamSize(s, p.port());
+}
+
void ParamTraits<net::HostPortPair>::Write(base::Pickle* m,
const param_type& p) {
WriteParam(m, p.host());
@@ -75,6 +89,12 @@ void ParamTraits<net::HostPortPair>::Log(const param_type& p, std::string* l) {
l->append(p.ToString());
}
+void ParamTraits<net::IPEndPoint>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, p.address());
+ GetParamSize(s, p.port());
+}
+
void ParamTraits<net::IPEndPoint>::Write(base::Pickle* m, const param_type& p) {
WriteParam(m, p.address());
WriteParam(m, p.port());
@@ -98,6 +118,11 @@ void ParamTraits<net::IPEndPoint>::Log(const param_type& p, std::string* l) {
LogParam("IPEndPoint:" + p.ToString(), l);
}
+void ParamTraits<net::IPAddress>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, p.bytes());
+}
+
void ParamTraits<net::IPAddress>::Write(base::Pickle* m, const param_type& p) {
WriteParam(m, p.bytes());
}
@@ -121,6 +146,11 @@ void ParamTraits<net::IPAddress>::Log(const param_type& p, std::string* l) {
LogParam("IPAddress:" + (p.empty() ? "(empty)" : p.ToString()), l);
}
+void ParamTraits<content::PageState>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ GetParamSize(s, p.ToEncodedData());
+}
+
void ParamTraits<content::PageState>::Write(base::Pickle* m,
const param_type& p) {
WriteParam(m, p.ToEncodedData());
@@ -145,6 +175,13 @@ void ParamTraits<content::PageState>::Log(
} // namespace IPC
+// Generate param traits size methods.
+#include "ipc/param_traits_size_macros.h"
+namespace IPC {
+#undef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_MACROS_H_
+#include "content/public/common/common_param_traits_macros.h"
+}
+
// Generate param traits write methods.
#include "ipc/param_traits_write_macros.h"
namespace IPC {
« no previous file with comments | « content/public/common/common_param_traits.h ('k') | device/bluetooth/bluetooth_uuid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698