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

Unified Diff: device/bluetooth/bluetooth_socket_win.cc

Issue 1565303002: Change IPEndpoint::address() to return a net::IPAddress (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 4 years, 11 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_socket_win.cc
diff --git a/device/bluetooth/bluetooth_socket_win.cc b/device/bluetooth/bluetooth_socket_win.cc
index dfa695106959dfb465f031920acf54e795b196f5..24b9f6db7e437f03f2e87dced894f32e40717810 100644
--- a/device/bluetooth/bluetooth_socket_win.cc
+++ b/device/bluetooth/bluetooth_socket_win.cc
@@ -39,18 +39,16 @@ const char kInvalidUUID[] = "Invalid UUID";
const char kWsaSetServiceError[] = "WSASetService error.";
std::string IPEndPointToBluetoothAddress(const net::IPEndPoint& end_point) {
- if (end_point.address().size() != net::kBluetoothAddressSize)
+ if (end_point.address_number().size() != net::kBluetoothAddressSize)
return std::string();
// The address is copied from BTH_ADDR field of SOCKADDR_BTH, which is a
// 64-bit ULONGLONG that stores Bluetooth address in little-endian. Print in
// reverse order to preserve the correct ordering.
- return base::StringPrintf("%02X:%02X:%02X:%02X:%02X:%02X",
- end_point.address()[5],
- end_point.address()[4],
- end_point.address()[3],
- end_point.address()[2],
- end_point.address()[1],
- end_point.address()[0]);
+ return base::StringPrintf(
+ "%02X:%02X:%02X:%02X:%02X:%02X", end_point.address_number()[5],
+ end_point.address_number()[4], end_point.address_number()[3],
+ end_point.address_number()[2], end_point.address_number()[1],
+ end_point.address_number()[0]);
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698