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

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

Issue 10134024: Move Referrer into CommonParamTraits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remediate to jam's review 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/common/view_messages.h ('k') | content/public/common/common_param_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/common_param_traits.h
diff --git a/content/public/common/common_param_traits.h b/content/public/common/common_param_traits.h
index 6afb2fd8f6eca81e1b4061ab3486e4f0dc6e8ec1..a63855fb306683401a74184177a51edd3d1f3925 100644
--- a/content/public/common/common_param_traits.h
+++ b/content/public/common/common_param_traits.h
@@ -8,7 +8,8 @@
// 'base' project can be found in ipc/ipc_message_utils.h. This file contains
// specializations for types that are used by the content code, and which need
// manual serialization code. This is usually because they're not structs with
-// public members..
+// public members, or because the same type is being used in multiple
+// *_messages.h headers.
#ifndef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_H_
#define CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_H_
@@ -25,10 +26,15 @@
#include "net/url_request/url_request_status.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/surface/transport_dib.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebReferrerPolicy.h"
gavinp 2012/04/23 19:25:04 N.B. This change makes the new upload relative to
#include "webkit/glue/resource_type.h"
class SkBitmap;
+namespace content {
+struct Referrer;
+}
+
namespace gfx {
class Point;
class Rect;
@@ -112,6 +118,14 @@ struct ParamTraits<base::PlatformFileInfo> {
};
template <>
+struct CONTENT_EXPORT ParamTraits<content::Referrer> {
+ typedef content::Referrer param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, PickleIterator* iter, param_type* p);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
struct CONTENT_EXPORT ParamTraits<gfx::Point> {
typedef gfx::Point param_type;
static void Write(Message* m, const param_type& p);
@@ -233,6 +247,11 @@ struct SimilarTypeTraits<base::PlatformFileError> {
};
template <>
+struct SimilarTypeTraits<WebKit::WebReferrerPolicy> {
+ typedef int Type;
+};
+
+template <>
struct SimilarTypeTraits<content::PageTransition> {
typedef int Type;
};
« no previous file with comments | « content/common/view_messages.h ('k') | content/public/common/common_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698