summaryrefslogtreecommitdiff
path: root/device/bluetooth
diff options
context:
space:
mode:
authorjam <jam@chromium.org>2016-05-12 06:05:05 +0900
committerQijiang Fan <fqj@google.com>2020-06-05 03:12:26 +0900
commit7f5c574869a37cbde645a6aaec6c26f4e1dfdf59 (patch)
treea358fedeaa424a72f84a0b256d3464f36308a168 /device/bluetooth
parent7440e374e4df0c6b42fad510e0b90fcd5800d9f1 (diff)
downloadlibchrome-7f5c574869a37cbde645a6aaec6c26f4e1dfdf59.tar.gz
Generate param traits size methods for IPC files in content/ (and traits it depends on).
This allows us to reuse these traits in Mojo if needed. I didn't add GetSize to every single trait in content/ and below; just enough to get the content message generator to compile with the size traits. NOTRY=true Review-Url: https://codereview.chromium.org/1966983003 Cr-Commit-Position: refs/heads/master@{#393058} CrOS-Libchrome-Original-Commit: 45eceef93a1f6018a9a9a63df84fa0b32a326315
Diffstat (limited to 'device/bluetooth')
-rw-r--r--device/bluetooth/bluetooth_uuid.cc6
-rw-r--r--device/bluetooth/bluetooth_uuid.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_uuid.cc b/device/bluetooth/bluetooth_uuid.cc
index 7a275e586e..7e55bc9d11 100644
--- a/device/bluetooth/bluetooth_uuid.cc
+++ b/device/bluetooth/bluetooth_uuid.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "ipc/ipc_message.h"
+#include "ipc/ipc_message_utils.h"
namespace device {
@@ -96,6 +97,11 @@ void PrintTo(const BluetoothUUID& uuid, std::ostream* out) {
} // namespace device
+void IPC::ParamTraits<device::BluetoothUUID>::GetSize(base::PickleSizer* s,
+ const param_type& p) {
+ IPC::GetParamSize(s, p.canonical_value());
+}
+
void IPC::ParamTraits<device::BluetoothUUID>::Write(base::Pickle* m,
const param_type& p) {
m->WriteString(p.canonical_value());
diff --git a/device/bluetooth/bluetooth_uuid.h b/device/bluetooth/bluetooth_uuid.h
index f36e8b540f..a1881c5edc 100644
--- a/device/bluetooth/bluetooth_uuid.h
+++ b/device/bluetooth/bluetooth_uuid.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/pickle.h"
#include "device/bluetooth/bluetooth_export.h"
#include "ipc/ipc_param_traits.h"
@@ -111,6 +112,7 @@ class Message;
template <>
struct DEVICE_BLUETOOTH_EXPORT ParamTraits<device::BluetoothUUID> {
typedef device::BluetoothUUID param_type;
+ static void GetSize(base::PickleSizer* s, const param_type& p);
static void Write(base::Pickle* m, const param_type& p);
static bool Read(const base::Pickle* m,
base::PickleIterator* iter,