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

Side by Side Diff: device/bluetooth/bluetooth_classic_device_mac.mm

Issue 2228953003: bluetooth: Change GetInquiryTxPower and GetInquiryRSSI to return optional. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: TIL value_or Created 4 years, 4 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_classic_device_mac.h ('k') | device/bluetooth/bluetooth_device.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_classic_device_mac.h" 5 #include "device/bluetooth/bluetooth_classic_device_mac.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/hash.h" 10 #include "base/hash.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if ([service_class_data getTypeDescriptor] == 141 if ([service_class_data getTypeDescriptor] ==
142 kBluetoothSDPDataElementTypeDataElementSequence) { 142 kBluetoothSDPDataElementTypeDataElementSequence) {
143 BluetoothUUID uuid = ExtractUuid(service_class_data); 143 BluetoothUUID uuid = ExtractUuid(service_class_data);
144 if (uuid.IsValid()) 144 if (uuid.IsValid())
145 uuids.push_back(uuid); 145 uuids.push_back(uuid);
146 } 146 }
147 } 147 }
148 return uuids; 148 return uuids;
149 } 149 }
150 150
151 int16_t BluetoothClassicDeviceMac::GetInquiryRSSI() const { 151 base::Optional<int8_t> BluetoothClassicDeviceMac::GetInquiryRSSI() const {
152 return kUnknownPower; 152 return base::nullopt;
153 } 153 }
154 154
155 int16_t BluetoothClassicDeviceMac::GetInquiryTxPower() const { 155 base::Optional<int8_t> BluetoothClassicDeviceMac::GetInquiryTxPower() const {
156 NOTIMPLEMENTED(); 156 return base::nullopt;
157 return kUnknownPower;
158 } 157 }
159 158
160 bool BluetoothClassicDeviceMac::ExpectingPinCode() const { 159 bool BluetoothClassicDeviceMac::ExpectingPinCode() const {
161 NOTIMPLEMENTED(); 160 NOTIMPLEMENTED();
162 return false; 161 return false;
163 } 162 }
164 163
165 bool BluetoothClassicDeviceMac::ExpectingPasskey() const { 164 bool BluetoothClassicDeviceMac::ExpectingPasskey() const {
166 NOTIMPLEMENTED(); 165 NOTIMPLEMENTED();
167 return false; 166 return false;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 return power_level; 282 return power_level;
284 } 283 }
285 284
286 // static 285 // static
287 std::string BluetoothClassicDeviceMac::GetDeviceAddress( 286 std::string BluetoothClassicDeviceMac::GetDeviceAddress(
288 IOBluetoothDevice* device) { 287 IOBluetoothDevice* device) {
289 return CanonicalizeAddress(base::SysNSStringToUTF8([device addressString])); 288 return CanonicalizeAddress(base::SysNSStringToUTF8([device addressString]));
290 } 289 }
291 290
292 } // namespace device 291 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_classic_device_mac.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698