summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorrockot <rockot@chromium.org>2016-02-03 12:20:16 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-03 20:21:49 +0000
commit502c94ff1a9f99b5c4ecfe700415cc4ed14228dd (patch)
tree260521d2640e580c11a54d24781ef0ebc32baee3 /device
parent26c9117edc07280155c69c7fab04729af46a79eb (diff)
downloadchromium_src-502c94ff1a9f99b5c4ecfe700415cc4ed14228dd.zip
chromium_src-502c94ff1a9f99b5c4ecfe700415cc4ed14228dd.tar.gz
chromium_src-502c94ff1a9f99b5c4ecfe700415cc4ed14228dd.tar.bz2
IPC::Message -> base::Pickle
This changes consumers of IPC::Message to generally refer refer to base::Pickle instead when performing serialization and deserialization operations. The few specific instances where the IPC::Message interface (Read/WriteAttachent) is needed can safely be static_cast'd, as IPC::Message is the only public subclass of base::Pickle. The purpose of this change is to facilitate the transition to Mojo IPC, as we've trained the Mojo bindings layer to use existing ParamTraits<T> parameterized over base::Pickle. To support this base::Pickle has had some stub interfaces added for WriteAttachment and ReadAttachment, along with a Pickle::Attachment. A follow-up patch will add sizing traits to the standard IPC_STRUCT macros, enabling the majority of Chrome IPC structs to be carried over Mojo message pipes as-is. BUG=577685 R=jam@chromium.org Review URL: https://codereview.chromium.org/1659003003 Cr-Commit-Position: refs/heads/master@{#373323}
Diffstat (limited to 'device')
-rw-r--r--device/bluetooth/bluetooth_uuid.cc4
-rw-r--r--device/bluetooth/bluetooth_uuid.h7
2 files changed, 7 insertions, 4 deletions
diff --git a/device/bluetooth/bluetooth_uuid.cc b/device/bluetooth/bluetooth_uuid.cc
index 89c1ac6..7a275e5 100644
--- a/device/bluetooth/bluetooth_uuid.cc
+++ b/device/bluetooth/bluetooth_uuid.cc
@@ -96,12 +96,12 @@ void PrintTo(const BluetoothUUID& uuid, std::ostream* out) {
} // namespace device
-void IPC::ParamTraits<device::BluetoothUUID>::Write(Message* m,
+void IPC::ParamTraits<device::BluetoothUUID>::Write(base::Pickle* m,
const param_type& p) {
m->WriteString(p.canonical_value());
}
-bool IPC::ParamTraits<device::BluetoothUUID>::Read(const Message* m,
+bool IPC::ParamTraits<device::BluetoothUUID>::Read(const base::Pickle* m,
base::PickleIterator* iter,
param_type* r) {
std::string value;
diff --git a/device/bluetooth/bluetooth_uuid.h b/device/bluetooth/bluetooth_uuid.h
index 5d7cdd2..f36e8b5 100644
--- a/device/bluetooth/bluetooth_uuid.h
+++ b/device/bluetooth/bluetooth_uuid.h
@@ -11,6 +11,7 @@
#include "ipc/ipc_param_traits.h"
namespace base {
+class Pickle;
class PickleIterator;
} // namespace base
@@ -110,8 +111,10 @@ class Message;
template <>
struct DEVICE_BLUETOOTH_EXPORT ParamTraits<device::BluetoothUUID> {
typedef device::BluetoothUUID param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
+ static void Write(base::Pickle* m, const param_type& p);
+ static bool Read(const base::Pickle* m,
+ base::PickleIterator* iter,
+ param_type* r);
static void Log(const param_type& p, std::string* l);
};