From 690a99c80e4fe4e6eda9010b88e4438f57912336 Mon Sep 17 00:00:00 2001 From: "avi@google.com" Date: Tue, 6 Jan 2009 16:48:45 +0000 Subject: Move plugins to FilePaths, some cleanup Review URL: http://codereview.chromium.org/16456 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7588 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/ipc_message_utils.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'chrome/common/ipc_message_utils.h') diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h index 476d7f9..39bb231 100644 --- a/chrome/common/ipc_message_utils.h +++ b/chrome/common/ipc_message_utils.h @@ -9,6 +9,7 @@ #include #include +#include "base/file_path.h" #include "base/string_util.h" #include "base/tuple.h" #include "chrome/common/ipc_sync_message.h" @@ -604,6 +605,24 @@ struct ParamTraits { #endif // defined(OS_WIN) template <> +struct ParamTraits { + typedef FilePath param_type; + static void Write(Message* m, const param_type& p) { + ParamTraits::Write(m, p.value()); + } + static bool Read(const Message* m, void** iter, param_type* r) { + FilePath::StringType value; + if (!ParamTraits::Read(m, iter, &value)) + return false; + *r = FilePath(value); + return true; + } + static void Log(const param_type& p, std::wstring* l) { + ParamTraits::Log(p.value(), l); + } +}; + +template <> struct ParamTraits { typedef gfx::Point param_type; static void Write(Message* m, const param_type& p); -- cgit v1.1