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 f56cff5346a93eda1ecab016842d69a0e283b07e..af06773a61b3dd8059833b3941569011a3733cfc 100644 |
--- a/content/public/common/common_param_traits.cc |
+++ b/content/public/common/common_param_traits.cc |
@@ -5,10 +5,12 @@ |
#include "content/public/common/common_param_traits.h" |
#include "content/public/common/content_constants.h" |
+#include "content/public/common/referrer.h" |
#include "net/base/host_port_pair.h" |
#include "net/base/upload_data.h" |
#include "net/http/http_response_headers.h" |
#include "third_party/skia/include/core/SkBitmap.h" |
+#include "third_party/WebKit/Source/Platform/chromium/public/WebReferrerPolicy.h" |
#include "ui/base/range/range.h" |
#include "ui/gfx/rect.h" |
@@ -445,6 +447,34 @@ void ParamTraits<base::PlatformFileInfo>::Log( |
l->append(")"); |
} |
+void ParamTraits<content::Referrer>::Write( |
+ Message* m, const param_type& p) { |
+ WriteParam(m, p.url); |
+ WriteParam(m, p.policy); |
+} |
+ |
+bool ParamTraits<content::Referrer>::Read( |
+ const Message* m, PickleIterator* iter, param_type* r) { |
+ GURL url; |
+ if (!ReadParam(m, iter, &url)) |
+ return false; |
+ WebKit::WebReferrerPolicy policy; |
+ if (!ReadParam(m, iter, &policy)) |
+ return false; |
+ r->url = url; |
+ r->policy = policy; |
+ return true; |
+} |
+ |
+void ParamTraits<content::Referrer>::Log( |
+ const param_type& p, std::string* l) { |
+ l->append("("); |
+ LogParam(p.url, l); |
+ l->append(","); |
+ LogParam(p.policy, l); |
+ l->append(")"); |
+} |
+ |
void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) { |
m->WriteInt(p.x()); |
m->WriteInt(p.y()); |