Chromium Code Reviews| Index: device/bluetooth/bluetooth_uuid.h |
| diff --git a/device/bluetooth/bluetooth_uuid.h b/device/bluetooth/bluetooth_uuid.h |
| index a1881c5edc456fc79cd56b3f80a590283f15682c..53a1a086f795f6ce59b472567fae55a96a35f5ff 100644 |
| --- a/device/bluetooth/bluetooth_uuid.h |
| +++ b/device/bluetooth/bluetooth_uuid.h |
| @@ -7,14 +7,7 @@ |
| #include <string> |
| -#include "base/pickle.h" |
| #include "device/bluetooth/bluetooth_export.h" |
| -#include "ipc/ipc_param_traits.h" |
| - |
| -namespace base { |
| -class Pickle; |
| -class PickleIterator; |
| -} // namespace base |
| namespace device { |
| @@ -104,22 +97,15 @@ PrintTo(const BluetoothUUID& uuid, std::ostream* out); |
| } // namespace device |
| -namespace IPC { |
| - |
| -class Message; |
| +namespace std { |
| -// Tell the IPC system how to serialize and deserialize a BluetoothUUID. |
| 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, |
| - param_type* r); |
| - static void Log(const param_type& p, std::string* l); |
| +struct hash<device::BluetoothUUID> { |
|
Jeffrey Yasskin
2016/05/31 21:52:58
Nice, thanks.
|
| + size_t operator()(const device::BluetoothUUID& uuid) const { |
| + return std::hash<std::string>()(uuid.canonical_value()); |
| + } |
| }; |
| -} // namespace IPC |
| +} // namespace std |
| #endif // DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ |