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

Unified Diff: device/bluetooth/bluetooth_uuid.cc

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_uuid.h ('k') | device/bluetooth/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_uuid.cc
diff --git a/device/bluetooth/bluetooth_uuid.cc b/device/bluetooth/bluetooth_uuid.cc
index 7e55bc9d11849b7f03efc74c1d349ba08901a605..071493a902b55ac8b0570b190e2ecf1885b1fa0d 100644
--- a/device/bluetooth/bluetooth_uuid.cc
+++ b/device/bluetooth/bluetooth_uuid.cc
@@ -8,8 +8,6 @@
#include "base/logging.h"
#include "base/strings/string_util.h"
-#include "ipc/ipc_message.h"
-#include "ipc/ipc_message_utils.h"
namespace device {
@@ -96,32 +94,3 @@ 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());
-}
-
-bool IPC::ParamTraits<device::BluetoothUUID>::Read(const base::Pickle* m,
- base::PickleIterator* iter,
- param_type* r) {
- std::string value;
- if (!iter->ReadString(&value))
- return false;
- *r = device::BluetoothUUID(value);
- // If the format isn't 128-bit, .value() would return a different answer than
- // .canonical_value(). Then if browser-side code accidentally checks .value()
- // against a 128-bit string literal, a hostile renderer could use the 16- or
- // 32-bit format and evade the check.
- return r->format() == device::BluetoothUUID::kFormat128Bit;
-}
-
-void IPC::ParamTraits<device::BluetoothUUID>::Log(const param_type& p,
- std::string* l) {
- l->append(p.canonical_value());
-}
« no previous file with comments | « device/bluetooth/bluetooth_uuid.h ('k') | device/bluetooth/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698