| 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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 VLOG(1) << "\t Allowed: " << uuid.canonical_value(); | 913 VLOG(1) << "\t Allowed: " << uuid.canonical_value(); |
| 914 filtered_uuids.push_back(uuid); | 914 filtered_uuids.push_back(uuid); |
| 915 } else { | 915 } else { |
| 916 VLOG(1) << "\t Not Allowed: " << uuid.canonical_value(); | 916 VLOG(1) << "\t Not Allowed: " << uuid.canonical_value(); |
| 917 } | 917 } |
| 918 } | 918 } |
| 919 | 919 |
| 920 content::BluetoothDevice device_ipc( | 920 content::BluetoothDevice device_ipc( |
| 921 device_id_for_origin, // id | 921 device_id_for_origin, // id |
| 922 device->GetName(), // name | 922 device->GetName(), // name |
| 923 content::BluetoothDevice::ValidatePower( | |
| 924 device->GetInquiryTxPower()), // tx_power | |
| 925 content::BluetoothDevice::ValidatePower( | |
| 926 device->GetInquiryRSSI()), // rssi | |
| 927 content::BluetoothDevice::UUIDsFromBluetoothUUIDs( | 923 content::BluetoothDevice::UUIDsFromBluetoothUUIDs( |
| 928 filtered_uuids)); // uuids | 924 filtered_uuids)); // uuids |
| 929 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS); | 925 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS); |
| 930 Send(new BluetoothMsg_RequestDeviceSuccess(session->thread_id, | 926 Send(new BluetoothMsg_RequestDeviceSuccess(session->thread_id, |
| 931 session->request_id, device_ipc)); | 927 session->request_id, device_ipc)); |
| 932 request_device_sessions_.Remove(chooser_id); | 928 request_device_sessions_.Remove(chooser_id); |
| 933 } | 929 } |
| 934 | 930 |
| 935 void BluetoothDispatcherHost::OnGATTConnectionCreated( | 931 void BluetoothDispatcherHost::OnGATTConnectionCreated( |
| 936 int thread_id, | 932 int thread_id, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 adapter_->RemoveObserver(observer); | 998 adapter_->RemoveObserver(observer); |
| 1003 } | 999 } |
| 1004 } | 1000 } |
| 1005 | 1001 |
| 1006 url::Origin BluetoothDispatcherHost::GetOrigin(int frame_routing_id) { | 1002 url::Origin BluetoothDispatcherHost::GetOrigin(int frame_routing_id) { |
| 1007 return RenderFrameHostImpl::FromID(render_process_id_, frame_routing_id) | 1003 return RenderFrameHostImpl::FromID(render_process_id_, frame_routing_id) |
| 1008 ->GetLastCommittedOrigin(); | 1004 ->GetLastCommittedOrigin(); |
| 1009 } | 1005 } |
| 1010 | 1006 |
| 1011 } // namespace content | 1007 } // namespace content |
| OLD | NEW |