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

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

Issue 170843007: Introduce url::Origin to represent Web Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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/websocket_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 18a0ee088acdc0b6b3311867781c70885a9199e7..8800fe12194e972058a0922b8be083cb0f199de3 100644
--- a/content/public/common/common_param_traits.h
+++ b/content/public/common/common_param_traits.h
@@ -14,6 +14,8 @@
#ifndef CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_H_
#define CONTENT_PUBLIC_COMMON_COMMON_PARAM_TRAITS_H_
+#include <string>
+
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
#include "content/public/common/common_param_traits_macros.h"
@@ -21,6 +23,7 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/surface/transport_dib.h"
#include "url/gurl.h"
+#include "url/origin.h"
class SkBitmap;
@@ -51,6 +54,14 @@ struct CONTENT_EXPORT ParamTraits<GURL> {
static void Log(const param_type& p, std::string* l);
};
+template <>
+struct CONTENT_EXPORT ParamTraits<url::Origin> {
+ typedef url::Origin 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<net::HostPortPair> {
typedef net::HostPortPair param_type;
« no previous file with comments | « content/common/websocket_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