summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_message_utils.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 00:24:54 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 00:24:54 +0000
commit0cfe5dae9265f8d3be8648e33421c7c76cb31b4e (patch)
treee66f9a09a25449285587c1734aeeef958e8744b0 /ipc/ipc_message_utils.cc
parent06e3320d99ac84f65837749d579b4768e8d071f7 (diff)
downloadchromium_src-0cfe5dae9265f8d3be8648e33421c7c76cb31b4e.zip
chromium_src-0cfe5dae9265f8d3be8648e33421c7c76cb31b4e.tar.gz
chromium_src-0cfe5dae9265f8d3be8648e33421c7c76cb31b4e.tar.bz2
Completely revert all my IPC work to see if this was what regressed the page cycler.
BUG=51411,52103 TEST=page cycler Review URL: http://codereview.chromium.org/3170020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_message_utils.cc')
-rw-r--r--ipc/ipc_message_utils.cc127
1 files changed, 0 insertions, 127 deletions
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 93f192ed..41fbde7 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -4,16 +4,10 @@
#include "ipc/ipc_message_utils.h"
-#include "base/file_path.h"
#include "base/json/json_writer.h"
-#include "base/nullable_string16.h"
#include "base/scoped_ptr.h"
#include "base/time.h"
#include "base/values.h"
-#if defined(OS_POSIX)
-#include "ipc/file_descriptor_set_posix.h"
-#endif
-#include "ipc/ipc_channel_handle.h"
namespace IPC {
@@ -207,24 +201,6 @@ 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);
}
@@ -262,107 +238,4 @@ void ParamTraits<ListValue>::Log(const param_type& p, std::wstring* l) {
base::JSONWriter::Write(&p, false, &json);
l->append(UTF8ToWide(json));
}
-
-void ParamTraits<NullableString16>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.string());
- WriteParam(m, p.is_null());
-}
-
-bool ParamTraits<NullableString16>::Read(const Message* m, void** iter,
- param_type* r) {
- string16 string;
- if (!ReadParam(m, iter, &string))
- return false;
- bool is_null;
- if (!ReadParam(m, iter, &is_null))
- return false;
- *r = NullableString16(string, is_null);
- return true;
-}
-
-void ParamTraits<NullableString16>::Log(const param_type& p, std::wstring* l) {
- l->append(L"(");
- LogParam(p.string(), l);
- l->append(L", ");
- LogParam(p.is_null(), l);
- l->append(L")");
-}
-
-void ParamTraits<FilePath>::Write(Message* m, const param_type& p) {
- ParamTraits<FilePath::StringType>::Write(m, p.value());
-}
-
-bool ParamTraits<FilePath>::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;
-}
-
-void ParamTraits<FilePath>::Log(const param_type& p, std::wstring* l) {
- ParamTraits<FilePath::StringType>::Log(p.value(), l);
-}
-
-#if defined(OS_POSIX)
-void ParamTraits<base::FileDescriptor>::Write(Message* m, const param_type& p) {
- const bool valid = p.fd >= 0;
- WriteParam(m, valid);
-
- if (valid) {
- if (!m->WriteFileDescriptor(p))
- NOTREACHED();
- }
-}
-
-bool ParamTraits<base::FileDescriptor>::Read(const Message* m, void** iter,
- param_type* r) {
- bool valid;
- if (!ReadParam(m, iter, &valid))
- return false;
-
- if (!valid) {
- r->fd = -1;
- r->auto_close = false;
- return true;
- }
-
- return m->ReadFileDescriptor(iter, r);
-}
-
-void ParamTraits<base::FileDescriptor>::Log(const param_type& p,
- std::wstring* l) {
- if (p.auto_close) {
- l->append(StringPrintf(L"FD(%d auto-close)", p.fd));
- } else {
- l->append(StringPrintf(L"FD(%d)", p.fd));
- }
-}
-#endif // defined(OS_POSIX)
-
-void ParamTraits<IPC::ChannelHandle>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.name);
-#if defined(OS_POSIX)
- WriteParam(m, p.socket);
-#endif
-}
-
-bool ParamTraits<IPC::ChannelHandle>::Read(const Message* m, void** iter,
- param_type* r) {
- return ReadParam(m, iter, &r->name)
-#if defined(OS_POSIX)
- && ReadParam(m, iter, &r->socket)
-#endif
- ;
-}
-
-void ParamTraits<IPC::ChannelHandle>::Log(const param_type& p,
- std::wstring* l) {
- l->append(ASCIIToWide(StringPrintf("ChannelHandle(%s", p.name.c_str())));
-#if defined(OS_POSIX)
- ParamTraits<base::FileDescriptor>::Log(p.socket, l);
-#endif
- l->append(L")");
-}
-
} // namespace IPC