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

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

Issue 10134024: Move Referrer into CommonParamTraits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include order Created 8 years, 8 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') | no next file » | 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 f56cff5346a93eda1ecab016842d69a0e283b07e..1eee82ed5b520ea0b4c59e94cb6d8a565b82d664 100644
--- a/content/public/common/common_param_traits.cc
+++ b/content/public/common/common_param_traits.cc
@@ -5,6 +5,7 @@
#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"
@@ -445,6 +446,26 @@ 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) {
+ return ReadParam(m, iter, &r->url) && ReadParam(m, iter, &r->policy);
+}
+
+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());
« no previous file with comments | « content/public/common/common_param_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698