| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // ID Not In Map Note: | 5 // ID Not In Map Note: |
| 6 // A service, characteristic, or descriptor ID not in the corresponding | 6 // A service, characteristic, or descriptor ID not in the corresponding |
| 7 // BluetoothDispatcherHost map [service_to_device_, characteristic_to_service_, | 7 // BluetoothDispatcherHost map [service_to_device_, characteristic_to_service_, |
| 8 // descriptor_to_characteristic_] implies a hostile renderer because a renderer | 8 // descriptor_to_characteristic_] implies a hostile renderer because a renderer |
| 9 // obtains the corresponding ID from this class and it will be added to the map | 9 // obtains the corresponding ID from this class and it will be added to the map |
| 10 // at that time. | 10 // at that time. |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 make_pair(characteristic_instance_id, service_instance_id)); | 615 make_pair(characteristic_instance_id, service_instance_id)); |
| 616 | 616 |
| 617 // If value is already in map, DCHECK it's valid. | 617 // If value is already in map, DCHECK it's valid. |
| 618 if (!insert_result.second) | 618 if (!insert_result.second) |
| 619 DCHECK(insert_result.first->second == service_instance_id); | 619 DCHECK(insert_result.first->second == service_instance_id); |
| 620 | 620 |
| 621 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::SUCCESS); | 621 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::SUCCESS); |
| 622 // TODO(ortuno): Use generated instance ID instead. | 622 // TODO(ortuno): Use generated instance ID instead. |
| 623 // https://crbug.com/495379 | 623 // https://crbug.com/495379 |
| 624 Send(new BluetoothMsg_GetCharacteristicSuccess( | 624 Send(new BluetoothMsg_GetCharacteristicSuccess( |
| 625 thread_id, request_id, characteristic_instance_id)); | 625 thread_id, request_id, characteristic_instance_id, |
| 626 static_cast<uint32>(characteristic->GetProperties()))); |
| 626 return; | 627 return; |
| 627 } | 628 } |
| 628 } | 629 } |
| 629 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::NOT_FOUND); | 630 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::NOT_FOUND); |
| 630 Send(new BluetoothMsg_GetCharacteristicError( | 631 Send(new BluetoothMsg_GetCharacteristicError( |
| 631 thread_id, request_id, WebBluetoothError::CharacteristicNotFound)); | 632 thread_id, request_id, WebBluetoothError::CharacteristicNotFound)); |
| 632 } | 633 } |
| 633 | 634 |
| 634 void BluetoothDispatcherHost::OnReadValue( | 635 void BluetoothDispatcherHost::OnReadValue( |
| 635 int thread_id, | 636 int thread_id, |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1134 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1134 NOTIMPLEMENTED(); | 1135 NOTIMPLEMENTED(); |
| 1135 } | 1136 } |
| 1136 | 1137 |
| 1137 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() { | 1138 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() { |
| 1138 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1139 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1139 NOTIMPLEMENTED(); | 1140 NOTIMPLEMENTED(); |
| 1140 } | 1141 } |
| 1141 | 1142 |
| 1142 } // namespace content | 1143 } // namespace content |
| OLD | NEW |