diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 16:48:45 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 16:48:45 +0000 |
commit | 690a99c80e4fe4e6eda9010b88e4438f57912336 (patch) | |
tree | 423390d4af89abd910ffd69f5e446720b1aa5b1f /chrome/common/ipc_message_utils.h | |
parent | 8c643f00166c14b146f8e5e0d2beedddacb58aab (diff) | |
download | chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.zip chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.tar.gz chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.tar.bz2 |
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
Diffstat (limited to 'chrome/common/ipc_message_utils.h')
-rw-r--r-- | chrome/common/ipc_message_utils.h | 19 |
1 files changed, 19 insertions, 0 deletions
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 <vector> #include <map> +#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<POINT> { #endif // defined(OS_WIN) template <> +struct ParamTraits<FilePath> { + typedef FilePath param_type; + static void Write(Message* m, const param_type& p) { + ParamTraits<FilePath::StringType>::Write(m, p.value()); + } + static bool Read(const Message* m, void** iter, param_type* r) { + FilePath::StringType value; + if (!ParamTraits<FilePath::StringType>::Read(m, iter, &value)) + return false; + *r = FilePath(value); + return true; + } + static void Log(const param_type& p, std::wstring* l) { + ParamTraits<FilePath::StringType>::Log(p.value(), l); + } +}; + +template <> struct ParamTraits<gfx::Point> { typedef gfx::Point param_type; static void Write(Message* m, const param_type& p); |