| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ipc/ipc_message_utils.h" | 5 #include "ipc/ipc_message_utils.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/strings/nullable_string16.h" | 10 #include "base/strings/nullable_string16.h" |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 base::PickleIterator* iter, | 942 base::PickleIterator* iter, |
| 943 param_type* r) { | 943 param_type* r) { |
| 944 int32_t temp; | 944 int32_t temp; |
| 945 if (!iter->ReadInt(&temp)) | 945 if (!iter->ReadInt(&temp)) |
| 946 return false; | 946 return false; |
| 947 *r = LongToHandle(temp); | 947 *r = LongToHandle(temp); |
| 948 return true; | 948 return true; |
| 949 } | 949 } |
| 950 | 950 |
| 951 void ParamTraits<HANDLE>::Log(const param_type& p, std::string* l) { | 951 void ParamTraits<HANDLE>::Log(const param_type& p, std::string* l) { |
| 952 l->append(base::StringPrintf("0x%X", p)); | 952 l->append(base::StringPrintf("0x%p", p)); |
| 953 } | 953 } |
| 954 | 954 |
| 955 void ParamTraits<LOGFONT>::Write(Message* m, const param_type& p) { | 955 void ParamTraits<LOGFONT>::Write(Message* m, const param_type& p) { |
| 956 m->WriteData(reinterpret_cast<const char*>(&p), sizeof(LOGFONT)); | 956 m->WriteData(reinterpret_cast<const char*>(&p), sizeof(LOGFONT)); |
| 957 } | 957 } |
| 958 | 958 |
| 959 bool ParamTraits<LOGFONT>::Read(const Message* m, | 959 bool ParamTraits<LOGFONT>::Read(const Message* m, |
| 960 base::PickleIterator* iter, | 960 base::PickleIterator* iter, |
| 961 param_type* r) { | 961 param_type* r) { |
| 962 const char *data; | 962 const char *data; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 return result; | 997 return result; |
| 998 } | 998 } |
| 999 | 999 |
| 1000 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { | 1000 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { |
| 1001 l->append("<MSG>"); | 1001 l->append("<MSG>"); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 #endif // OS_WIN | 1004 #endif // OS_WIN |
| 1005 | 1005 |
| 1006 } // namespace IPC | 1006 } // namespace IPC |
| OLD | NEW |