Chromium Code Reviews| 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1134 continuation.Run(); | 1134 continuation.Run(); |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 void BluetoothDispatcherHost::OnRequestDeviceImpl( | 1137 void BluetoothDispatcherHost::OnRequestDeviceImpl( |
| 1138 int thread_id, | 1138 int thread_id, |
| 1139 int request_id, | 1139 int request_id, |
| 1140 int frame_routing_id, | 1140 int frame_routing_id, |
| 1141 const std::vector<BluetoothScanFilter>& filters, | 1141 const std::vector<BluetoothScanFilter>& filters, |
| 1142 const std::vector<BluetoothUUID>& optional_services) { | 1142 const std::vector<BluetoothUUID>& optional_services) { |
| 1143 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 1143 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 1144 RecordWebBluetoothFunctionCall(UMAWebBluetoothFunction::REQUEST_DEVICE); | |
| 1145 RecordRequestDeviceArguments(filters, optional_services); | |
|
Jeffrey Yasskin
2016/03/29 15:24:13
I don't see another copy of RecordRequestDeviceArg
ortuno
2016/03/29 15:29:20
Added RecordRequestDeviceArguments to OnRequestDev
| |
| 1146 | 1144 |
| 1147 VLOG(1) << "requestDevice called with the following filters: "; | 1145 VLOG(1) << "requestDevice called with the following filters: "; |
| 1148 for (const BluetoothScanFilter& filter : filters) { | 1146 for (const BluetoothScanFilter& filter : filters) { |
| 1149 VLOG(1) << "Name: " << filter.name; | 1147 VLOG(1) << "Name: " << filter.name; |
| 1150 VLOG(1) << "Name Prefix: " << filter.namePrefix; | 1148 VLOG(1) << "Name Prefix: " << filter.namePrefix; |
| 1151 VLOG(1) << "Services:"; | 1149 VLOG(1) << "Services:"; |
| 1152 VLOG(1) << "\t["; | 1150 VLOG(1) << "\t["; |
| 1153 for (const BluetoothUUID& service : filter.services) | 1151 for (const BluetoothUUID& service : filter.services) |
| 1154 VLOG(1) << "\t\t" << service.value(); | 1152 VLOG(1) << "\t\t" << service.value(); |
| 1155 VLOG(1) << "\t]"; | 1153 VLOG(1) << "\t]"; |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1664 | 1662 |
| 1665 bool BluetoothDispatcherHost::CanFrameAccessCharacteristicInstance( | 1663 bool BluetoothDispatcherHost::CanFrameAccessCharacteristicInstance( |
| 1666 int frame_routing_id, | 1664 int frame_routing_id, |
| 1667 const std::string& characteristic_instance_id) { | 1665 const std::string& characteristic_instance_id) { |
| 1668 return QueryCacheForCharacteristic(GetOrigin(frame_routing_id), | 1666 return QueryCacheForCharacteristic(GetOrigin(frame_routing_id), |
| 1669 characteristic_instance_id) | 1667 characteristic_instance_id) |
| 1670 .outcome != CacheQueryOutcome::BAD_RENDERER; | 1668 .outcome != CacheQueryOutcome::BAD_RENDERER; |
| 1671 } | 1669 } |
| 1672 | 1670 |
| 1673 } // namespace content | 1671 } // namespace content |
| OLD | NEW |