| 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 make_pair(characteristic_instance_id, service_instance_id)); | 617 make_pair(characteristic_instance_id, service_instance_id)); |
| 618 | 618 |
| 619 // If value is already in map, DCHECK it's valid. | 619 // If value is already in map, DCHECK it's valid. |
| 620 if (!insert_result.second) | 620 if (!insert_result.second) |
| 621 DCHECK(insert_result.first->second == service_instance_id); | 621 DCHECK(insert_result.first->second == service_instance_id); |
| 622 | 622 |
| 623 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::SUCCESS); | 623 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::SUCCESS); |
| 624 // TODO(ortuno): Use generated instance ID instead. | 624 // TODO(ortuno): Use generated instance ID instead. |
| 625 // https://crbug.com/495379 | 625 // https://crbug.com/495379 |
| 626 Send(new BluetoothMsg_GetCharacteristicSuccess( | 626 Send(new BluetoothMsg_GetCharacteristicSuccess( |
| 627 thread_id, request_id, characteristic_instance_id)); | 627 thread_id, request_id, characteristic_instance_id, |
| 628 static_cast<uint32>(characteristic->GetProperties()))); |
| 628 return; | 629 return; |
| 629 } | 630 } |
| 630 } | 631 } |
| 631 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::NOT_FOUND); | 632 RecordGetCharacteristicOutcome(UMAGetCharacteristicOutcome::NOT_FOUND); |
| 632 Send(new BluetoothMsg_GetCharacteristicError( | 633 Send(new BluetoothMsg_GetCharacteristicError( |
| 633 thread_id, request_id, WebBluetoothError::CharacteristicNotFound)); | 634 thread_id, request_id, WebBluetoothError::CharacteristicNotFound)); |
| 634 } | 635 } |
| 635 | 636 |
| 636 void BluetoothDispatcherHost::OnReadValue( | 637 void BluetoothDispatcherHost::OnReadValue( |
| 637 int thread_id, | 638 int thread_id, |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1136 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1136 NOTIMPLEMENTED(); | 1137 NOTIMPLEMENTED(); |
| 1137 } | 1138 } |
| 1138 | 1139 |
| 1139 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() { | 1140 void BluetoothDispatcherHost::ShowBluetoothAdapterOffLink() { |
| 1140 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1141 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1141 NOTIMPLEMENTED(); | 1142 NOTIMPLEMENTED(); |
| 1142 } | 1143 } |
| 1143 | 1144 |
| 1144 } // namespace content | 1145 } // namespace content |
| OLD | NEW |