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

Side by Side Diff: device/bluetooth/bluetooth_device.cc

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_android.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/bluetooth_device.h" 5 #include "device/bluetooth/bluetooth_device.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 return l10n_util::GetStringFUTF16( 88 return l10n_util::GetStringFUTF16(
89 IDS_BLUETOOTH_DEVICE_KEYBOARD_MOUSE_COMBO, address_utf16); 89 IDS_BLUETOOTH_DEVICE_KEYBOARD_MOUSE_COMBO, address_utf16);
90 default: 90 default:
91 return l10n_util::GetStringFUTF16(IDS_BLUETOOTH_DEVICE_UNKNOWN, 91 return l10n_util::GetStringFUTF16(IDS_BLUETOOTH_DEVICE_UNKNOWN,
92 address_utf16); 92 address_utf16);
93 } 93 }
94 } 94 }
95 95
96 BluetoothDevice::DeviceType BluetoothDevice::GetDeviceType() const { 96 BluetoothDevice::DeviceType BluetoothDevice::GetDeviceType() const {
97 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm 97 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
98 uint32 bluetooth_class = GetBluetoothClass(); 98 uint32_t bluetooth_class = GetBluetoothClass();
99 switch ((bluetooth_class & 0x1f00) >> 8) { 99 switch ((bluetooth_class & 0x1f00) >> 8) {
100 case 0x01: 100 case 0x01:
101 // Computer major device class. 101 // Computer major device class.
102 return DEVICE_COMPUTER; 102 return DEVICE_COMPUTER;
103 case 0x02: 103 case 0x02:
104 // Phone major device class. 104 // Phone major device class.
105 switch ((bluetooth_class & 0xfc) >> 2) { 105 switch ((bluetooth_class & 0xfc) >> 2) {
106 case 0x01: 106 case 0x01:
107 case 0x02: 107 case 0x02:
108 case 0x03: 108 case 0x03:
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 base::BinaryValue::CreateWithCopiedBuffer(buffer, size)); 337 base::BinaryValue::CreateWithCopiedBuffer(buffer, size));
338 } 338 }
339 339
340 void BluetoothDevice::Pair(PairingDelegate* pairing_delegate, 340 void BluetoothDevice::Pair(PairingDelegate* pairing_delegate,
341 const base::Closure& callback, 341 const base::Closure& callback,
342 const ConnectErrorCallback& error_callback) { 342 const ConnectErrorCallback& error_callback) {
343 NOTREACHED(); 343 NOTREACHED();
344 } 344 }
345 345
346 } // namespace device 346 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device.h ('k') | device/bluetooth/bluetooth_device_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698