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

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

Issue 9875026: **NOTFORLANDING** New link rel=prerender API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch sets 3-7 against trunk, for combined browsing 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
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());

Powered by Google App Engine
This is Rietveld 408576698