diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 18:02:03 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-10 18:02:03 +0000 |
commit | 6edce23f84fe2b88e4dfe8e101b05e60a3646b80 (patch) | |
tree | 5a7ad67cc6f35469d5abab6090fcbd7424da91ba /ipc/ipc_message_utils.cc | |
parent | a31c66d79a124782bbaa16870bffbc83bdb639f8 (diff) | |
download | chromium_src-6edce23f84fe2b88e4dfe8e101b05e60a3646b80.zip chromium_src-6edce23f84fe2b88e4dfe8e101b05e60a3646b80.tar.gz chromium_src-6edce23f84fe2b88e4dfe8e101b05e60a3646b80.tar.bz2 |
FBTF: Reapplies r55259, the first new IPC definition patch.
This moves MessageWithTuple::Read() back into the main ipc_message_utils.h
header from the private ipc_messsage_utils_impl.h header. In release mode, this
was causing link failures.
BUG=51411
TEST=none
Review URL: http://codereview.chromium.org/3069034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_utils.cc')
-rw-r--r-- | ipc/ipc_message_utils.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc index 41fbde7..7975faa 100644 --- a/ipc/ipc_message_utils.cc +++ b/ipc/ipc_message_utils.cc @@ -201,6 +201,24 @@ static bool ReadValue(const Message* m, void** iter, Value** value, return true; } + +void ParamTraits<base::Time>::Write(Message* m, const param_type& p) { + ParamTraits<int64>::Write(m, p.ToInternalValue()); +} + +bool ParamTraits<base::Time>::Read(const Message* m, void** iter, + param_type* r) { + int64 value; + if (!ParamTraits<int64>::Read(m, iter, &value)) + return false; + *r = base::Time::FromInternalValue(value); + return true; +} + +void ParamTraits<base::Time>::Log(const param_type& p, std::wstring* l) { + ParamTraits<int64>::Log(p.ToInternalValue(), l); +} + void ParamTraits<DictionaryValue>::Write(Message* m, const param_type& p) { WriteValue(m, &p, 0); } |