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

Unified Diff: device/bluetooth/bluetooth_uuid.cc

Issue 1172853004: Chromium side of RequestDeviceOptions implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Sync & tweak Created 5 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
Index: device/bluetooth/bluetooth_uuid.cc
diff --git a/device/bluetooth/bluetooth_uuid.cc b/device/bluetooth/bluetooth_uuid.cc
index 714d1c5c3409ddffbe8357926e2c131fed1cff18..5873de2611b56e529ebd35b4cd1d8b595d56c782 100644
--- a/device/bluetooth/bluetooth_uuid.cc
+++ b/device/bluetooth/bluetooth_uuid.cc
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/strings/string_util.h"
+#include "ipc/ipc_message.h"
namespace device {
@@ -93,3 +94,23 @@ void PrintTo(const BluetoothUUID& uuid, std::ostream* out) {
}
} // namespace device
+
+void IPC::ParamTraits<device::BluetoothUUID>::Write(Message* m,
+ const param_type& p) {
+ m->WriteString(p.value());
+}
+
+bool IPC::ParamTraits<device::BluetoothUUID>::Read(const Message* m,
+ base::PickleIterator* iter,
+ param_type* r) {
+ std::string value;
+ if (!iter->ReadString(&value))
+ return false;
+ *r = device::BluetoothUUID(value);
+ return r->IsValid();
+}
+
+void IPC::ParamTraits<device::BluetoothUUID>::Log(const param_type& p,
+ std::string* l) {
+ l->append(p.canonical_value());
+}

Powered by Google App Engine
This is Rietveld 408576698