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

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

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
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_win.h" 5 #include "device/bluetooth/bluetooth_device_win.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 bool BluetoothDeviceWin::IsConnecting() const { 111 bool BluetoothDeviceWin::IsConnecting() const {
112 return false; 112 return false;
113 } 113 }
114 114
115 BluetoothDevice::UUIDList BluetoothDeviceWin::GetUUIDs() const { 115 BluetoothDevice::UUIDList BluetoothDeviceWin::GetUUIDs() const {
116 return uuids_; 116 return uuids_;
117 } 117 }
118 118
119 int16_t BluetoothDeviceWin::GetInquiryRSSI() const { 119 base::Optional<int8_t> BluetoothDeviceWin::GetInquiryRSSI() const {
120 return kUnknownPower; 120 // In windows, we can only get connected devices and connected
121 // devices don't have an Inquiry RSSI.
122 return base::nullopt;
121 } 123 }
122 124
123 int16_t BluetoothDeviceWin::GetInquiryTxPower() const { 125 base::Optional<int8_t> BluetoothDeviceWin::GetInquiryTxPower() const {
124 NOTIMPLEMENTED(); 126 // In windows, we can only get connected devices and connected
125 return kUnknownPower; 127 // devices don't have an Inquiry Tx Power.
128 return base::nullopt;
126 } 129 }
127 130
128 bool BluetoothDeviceWin::ExpectingPinCode() const { 131 bool BluetoothDeviceWin::ExpectingPinCode() const {
129 NOTIMPLEMENTED(); 132 NOTIMPLEMENTED();
130 return false; 133 return false;
131 } 134 }
132 135
133 bool BluetoothDeviceWin::ExpectingPasskey() const { 136 bool BluetoothDeviceWin::ExpectingPasskey() const {
134 NOTIMPLEMENTED(); 137 NOTIMPLEMENTED();
135 return false; 138 return false;
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 primary_service->GetIdentifier(), 397 primary_service->GetIdentifier(),
395 std::unique_ptr<BluetoothRemoteGattService>(primary_service)); 398 std::unique_ptr<BluetoothRemoteGattService>(primary_service));
396 adapter_->NotifyGattServiceAdded(primary_service); 399 adapter_->NotifyGattServiceAdded(primary_service);
397 } 400 }
398 } 401 }
399 402
400 adapter_->NotifyGattServicesDiscovered(this); 403 adapter_->NotifyGattServicesDiscovered(this);
401 } 404 }
402 405
403 } // namespace device 406 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_win.h ('k') | device/bluetooth/bluetooth_low_energy_device_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698