Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Unified Diff: device/bluetooth/bluetooth_uuid.h

Issue 2015463004: bluetooth: Use BluetoothUUID instead of string when sending uuids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-request-device
Patch Set: Fix merge conflict Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluetooth_uuid.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_uuid.h
diff --git a/device/bluetooth/bluetooth_uuid.h b/device/bluetooth/bluetooth_uuid.h
index a1881c5edc456fc79cd56b3f80a590283f15682c..8487f6a2da552b10a289b70d6f0980e56661b373 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 {
@@ -102,24 +95,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothUUID {
void DEVICE_BLUETOOTH_EXPORT
PrintTo(const BluetoothUUID& uuid, std::ostream* out);
-} // namespace device
-
-namespace IPC {
-
-class Message;
-
-// 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 BluetoothUUIDHash {
+ size_t operator()(const device::BluetoothUUID& uuid) const {
+ return std::hash<std::string>()(uuid.canonical_value());
+ }
};
-} // namespace IPC
+} // namespace device
#endif // DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_
« no previous file with comments | « device/bluetooth/bluetooth.gyp ('k') | device/bluetooth/bluetooth_uuid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698