Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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: A service, characteristic, or descriptor ID not in the | 5 // ID Not In Map Note: A service, characteristic, or descriptor ID not in the |
| 6 // corresponding WebBluetoothServiceImpl map [service_id_to_device_address_, | 6 // corresponding WebBluetoothServiceImpl map [service_id_to_device_address_, |
| 7 // characteristic_id_to_service_id_, descriptor_id_to_characteristic_id_] | 7 // characteristic_id_to_service_id_, descriptor_id_to_characteristic_id_] |
| 8 // implies a hostile renderer because a renderer obtains the corresponding ID | 8 // implies a hostile renderer because a renderer obtains the corresponding ID |
| 9 // from this class and it will be added to the map at that time. | 9 // from this class and it will be added to the map at that time. |
| 10 | 10 |
| 11 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" | 11 #include "content/browser/bluetooth/web_bluetooth_service_impl.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 | 14 |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
| 17 #include "content/browser/bluetooth/bluetooth_blocklist.h" | 17 #include "content/browser/bluetooth/bluetooth_blocklist.h" |
| 18 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" | 18 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" |
| 19 #include "content/browser/bluetooth/bluetooth_metrics.h" | 19 #include "content/browser/bluetooth/bluetooth_metrics.h" |
| 20 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h" | 20 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h" |
| 21 #include "content/browser/renderer_host/render_process_host_impl.h" | 21 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 22 #include "content/common/bluetooth/web_bluetooth_device_id.h" | 22 #include "content/common/bluetooth/web_bluetooth_device_id.h" |
| 23 #include "content/public/browser/bluetooth_allowed_devices_map_base.h" | |
| 23 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/browser/navigation_handle.h" | 25 #include "content/public/browser/navigation_handle.h" |
| 25 #include "content/public/browser/render_frame_host.h" | 26 #include "content/public/browser/render_frame_host.h" |
| 26 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
| 28 #include "content/public/browser/web_contents_delegate.h" | |
| 27 #include "device/bluetooth/bluetooth_adapter_factory_wrapper.h" | 29 #include "device/bluetooth/bluetooth_adapter_factory_wrapper.h" |
| 28 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" | 30 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" |
| 29 #include "device/bluetooth/bluetooth_remote_gatt_descriptor.h" | 31 #include "device/bluetooth/bluetooth_remote_gatt_descriptor.h" |
| 30 | 32 |
| 31 using device::BluetoothAdapterFactoryWrapper; | 33 using device::BluetoothAdapterFactoryWrapper; |
| 32 using device::BluetoothUUID; | 34 using device::BluetoothUUID; |
| 33 | 35 |
| 34 namespace content { | 36 namespace content { |
| 35 | 37 |
| 36 namespace { | 38 namespace { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 WebBluetoothServiceImpl::WebBluetoothServiceImpl( | 168 WebBluetoothServiceImpl::WebBluetoothServiceImpl( |
| 167 RenderFrameHost* render_frame_host, | 169 RenderFrameHost* render_frame_host, |
| 168 blink::mojom::WebBluetoothServiceRequest request) | 170 blink::mojom::WebBluetoothServiceRequest request) |
| 169 : WebContentsObserver(WebContents::FromRenderFrameHost(render_frame_host)), | 171 : WebContentsObserver(WebContents::FromRenderFrameHost(render_frame_host)), |
| 170 connected_devices_(new FrameConnectedBluetoothDevices(render_frame_host)), | 172 connected_devices_(new FrameConnectedBluetoothDevices(render_frame_host)), |
| 171 render_frame_host_(render_frame_host), | 173 render_frame_host_(render_frame_host), |
| 172 binding_(this, std::move(request)), | 174 binding_(this, std::move(request)), |
| 173 weak_ptr_factory_(this) { | 175 weak_ptr_factory_(this) { |
| 174 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 176 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 175 CHECK(web_contents()); | 177 CHECK(web_contents()); |
| 178 WebContentsDelegate* delegate = web_contents()->GetDelegate(); | |
| 179 DCHECK(delegate); | |
|
scheib
2017/01/26 04:27:36
These first 2 DCHECKs can be removed. The last wil
juncai
2017/01/30 20:34:55
Done.
| |
| 180 BluetoothAllowedDevicesMapBase* allowed_devices_map = | |
| 181 delegate->GetBluetoothDevicesMap(render_frame_host_); | |
| 182 DCHECK(allowed_devices_map); | |
| 183 allowed_devices_ = | |
| 184 allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin()); | |
| 185 DCHECK(allowed_devices_); | |
| 176 } | 186 } |
| 177 | 187 |
| 178 WebBluetoothServiceImpl::~WebBluetoothServiceImpl() { | 188 WebBluetoothServiceImpl::~WebBluetoothServiceImpl() { |
| 179 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 189 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 180 ClearState(); | 190 ClearState(); |
| 181 } | 191 } |
| 182 | 192 |
| 183 void WebBluetoothServiceImpl::SetClientConnectionErrorHandler( | 193 void WebBluetoothServiceImpl::SetClientConnectionErrorHandler( |
| 184 base::Closure closure) { | 194 base::Closure closure) { |
| 185 binding_.set_connection_error_handler(closure); | 195 binding_.set_connection_error_handler(closure); |
| 186 } | 196 } |
| 187 | 197 |
| 188 bool WebBluetoothServiceImpl::IsDevicePaired( | 198 bool WebBluetoothServiceImpl::IsDevicePaired( |
| 189 const std::string& device_address) { | 199 const std::string& device_address) { |
| 190 return allowed_devices_map_.GetDeviceId(GetOrigin(), device_address) != | 200 return allowed_devices_->GetDeviceId(device_address) != nullptr; |
| 191 nullptr; | |
| 192 } | 201 } |
| 193 | 202 |
| 194 void WebBluetoothServiceImpl::DidFinishNavigation( | 203 void WebBluetoothServiceImpl::DidFinishNavigation( |
| 195 NavigationHandle* navigation_handle) { | 204 NavigationHandle* navigation_handle) { |
| 196 if (navigation_handle->HasCommitted() && | 205 if (navigation_handle->HasCommitted() && |
| 197 navigation_handle->GetRenderFrameHost() == render_frame_host_ && | 206 navigation_handle->GetRenderFrameHost() == render_frame_host_ && |
| 198 !navigation_handle->IsSamePage()) { | 207 !navigation_handle->IsSamePage()) { |
| 199 ClearState(); | 208 ClearState(); |
| 200 } | 209 } |
| 201 } | 210 } |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 379 blink::mojom::WebBluetoothGATTQueryQuantity quantity, | 388 blink::mojom::WebBluetoothGATTQueryQuantity quantity, |
| 380 const base::Optional<BluetoothUUID>& services_uuid, | 389 const base::Optional<BluetoothUUID>& services_uuid, |
| 381 const RemoteServerGetPrimaryServicesCallback& callback) { | 390 const RemoteServerGetPrimaryServicesCallback& callback) { |
| 382 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 391 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 383 RecordWebBluetoothFunctionCall( | 392 RecordWebBluetoothFunctionCall( |
| 384 quantity == blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE | 393 quantity == blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE |
| 385 ? UMAWebBluetoothFunction::GET_PRIMARY_SERVICE | 394 ? UMAWebBluetoothFunction::GET_PRIMARY_SERVICE |
| 386 : UMAWebBluetoothFunction::GET_PRIMARY_SERVICES); | 395 : UMAWebBluetoothFunction::GET_PRIMARY_SERVICES); |
| 387 RecordGetPrimaryServicesServices(quantity, services_uuid); | 396 RecordGetPrimaryServicesServices(quantity, services_uuid); |
| 388 | 397 |
| 389 if (!allowed_devices_map_.IsOriginAllowedToAccessAtLeastOneService( | 398 if (!allowed_devices_->IsAllowedToAccessAtLeastOneService(device_id)) { |
| 390 GetOrigin(), device_id)) { | |
| 391 callback.Run( | 399 callback.Run( |
| 392 blink::mojom::WebBluetoothResult::NOT_ALLOWED_TO_ACCESS_ANY_SERVICE, | 400 blink::mojom::WebBluetoothResult::NOT_ALLOWED_TO_ACCESS_ANY_SERVICE, |
| 393 base::nullopt /* service */); | 401 base::nullopt /* service */); |
| 394 return; | 402 return; |
| 395 } | 403 } |
| 396 | 404 |
| 397 if (services_uuid && | 405 if (services_uuid && |
| 398 !allowed_devices_map_.IsOriginAllowedToAccessService( | 406 !allowed_devices_->IsAllowedToAccessService(device_id, |
| 399 GetOrigin(), device_id, services_uuid.value())) { | 407 services_uuid.value())) { |
| 400 callback.Run( | 408 callback.Run( |
| 401 blink::mojom::WebBluetoothResult::NOT_ALLOWED_TO_ACCESS_SERVICE, | 409 blink::mojom::WebBluetoothResult::NOT_ALLOWED_TO_ACCESS_SERVICE, |
| 402 base::nullopt /* service */); | 410 base::nullopt /* service */); |
| 403 return; | 411 return; |
| 404 } | 412 } |
| 405 | 413 |
| 406 const CacheQueryResult query_result = QueryCacheForDevice(device_id); | 414 const CacheQueryResult query_result = QueryCacheForDevice(device_id); |
| 407 | 415 |
| 408 if (query_result.outcome == CacheQueryOutcome::BAD_RENDERER) { | 416 if (query_result.outcome == CacheQueryOutcome::BAD_RENDERER) { |
| 409 return; | 417 return; |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 767 device::BluetoothDevice* device) { | 775 device::BluetoothDevice* device) { |
| 768 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 776 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 769 DCHECK(device->IsGattServicesDiscoveryComplete()); | 777 DCHECK(device->IsGattServicesDiscoveryComplete()); |
| 770 | 778 |
| 771 std::vector<device::BluetoothRemoteGattService*> services = | 779 std::vector<device::BluetoothRemoteGattService*> services = |
| 772 services_uuid ? device->GetPrimaryServicesByUUID(services_uuid.value()) | 780 services_uuid ? device->GetPrimaryServicesByUUID(services_uuid.value()) |
| 773 : device->GetPrimaryServices(); | 781 : device->GetPrimaryServices(); |
| 774 | 782 |
| 775 std::vector<blink::mojom::WebBluetoothRemoteGATTServicePtr> response_services; | 783 std::vector<blink::mojom::WebBluetoothRemoteGATTServicePtr> response_services; |
| 776 for (device::BluetoothRemoteGattService* service : services) { | 784 for (device::BluetoothRemoteGattService* service : services) { |
| 777 if (!allowed_devices_map_.IsOriginAllowedToAccessService( | 785 if (!allowed_devices_->IsAllowedToAccessService(device_id, |
| 778 GetOrigin(), device_id, service->GetUUID())) { | 786 service->GetUUID())) { |
| 779 continue; | 787 continue; |
| 780 } | 788 } |
| 781 std::string service_instance_id = service->GetIdentifier(); | 789 std::string service_instance_id = service->GetIdentifier(); |
| 782 const std::string& device_address = device->GetAddress(); | 790 const std::string& device_address = device->GetAddress(); |
| 783 auto insert_result = service_id_to_device_address_.insert( | 791 auto insert_result = service_id_to_device_address_.insert( |
| 784 make_pair(service_instance_id, device_address)); | 792 make_pair(service_instance_id, device_address)); |
| 785 // If value is already in map, DCHECK it's valid. | 793 // If value is already in map, DCHECK it's valid. |
| 786 if (!insert_result.second) | 794 if (!insert_result.second) |
| 787 DCHECK_EQ(insert_result.first->second, device_address); | 795 DCHECK_EQ(insert_result.first->second, device_address); |
| 788 | 796 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 825 const device::BluetoothDevice* const device = | 833 const device::BluetoothDevice* const device = |
| 826 GetAdapter()->GetDevice(device_address); | 834 GetAdapter()->GetDevice(device_address); |
| 827 if (device == nullptr) { | 835 if (device == nullptr) { |
| 828 DVLOG(1) << "Device " << device_address << " no longer in adapter"; | 836 DVLOG(1) << "Device " << device_address << " no longer in adapter"; |
| 829 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::CHOSEN_DEVICE_VANISHED); | 837 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::CHOSEN_DEVICE_VANISHED); |
| 830 callback.Run(blink::mojom::WebBluetoothResult::CHOSEN_DEVICE_VANISHED, | 838 callback.Run(blink::mojom::WebBluetoothResult::CHOSEN_DEVICE_VANISHED, |
| 831 nullptr /* device */); | 839 nullptr /* device */); |
| 832 return; | 840 return; |
| 833 } | 841 } |
| 834 | 842 |
| 835 const WebBluetoothDeviceId device_id_for_origin = | 843 const WebBluetoothDeviceId device_id = |
| 836 allowed_devices_map_.AddDevice(GetOrigin(), device_address, options); | 844 allowed_devices_->AddDevice(device_address, options); |
| 837 | 845 |
| 838 DVLOG(1) << "Device: " << device->GetNameForDisplay(); | 846 DVLOG(1) << "Device: " << device->GetNameForDisplay(); |
| 839 | 847 |
| 840 blink::mojom::WebBluetoothDevicePtr device_ptr = | 848 blink::mojom::WebBluetoothDevicePtr device_ptr = |
| 841 blink::mojom::WebBluetoothDevice::New(); | 849 blink::mojom::WebBluetoothDevice::New(); |
| 842 device_ptr->id = device_id_for_origin; | 850 device_ptr->id = device_id; |
| 843 device_ptr->name = device->GetName(); | 851 device_ptr->name = device->GetName(); |
| 844 | 852 |
| 845 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS); | 853 RecordRequestDeviceOutcome(UMARequestDeviceOutcome::SUCCESS); |
| 846 callback.Run(blink::mojom::WebBluetoothResult::SUCCESS, | 854 callback.Run(blink::mojom::WebBluetoothResult::SUCCESS, |
| 847 std::move(device_ptr)); | 855 std::move(device_ptr)); |
| 848 } | 856 } |
| 849 | 857 |
| 850 void WebBluetoothServiceImpl::OnGetDeviceFailed( | 858 void WebBluetoothServiceImpl::OnGetDeviceFailed( |
| 851 const RequestDeviceCallback& callback, | 859 const RequestDeviceCallback& callback, |
| 852 blink::mojom::WebBluetoothResult result) { | 860 blink::mojom::WebBluetoothResult result) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 934 void WebBluetoothServiceImpl::OnStopNotifySessionComplete( | 942 void WebBluetoothServiceImpl::OnStopNotifySessionComplete( |
| 935 const std::string& characteristic_instance_id, | 943 const std::string& characteristic_instance_id, |
| 936 const RemoteCharacteristicStopNotificationsCallback& callback) { | 944 const RemoteCharacteristicStopNotificationsCallback& callback) { |
| 937 characteristic_id_to_notify_session_.erase(characteristic_instance_id); | 945 characteristic_id_to_notify_session_.erase(characteristic_instance_id); |
| 938 callback.Run(); | 946 callback.Run(); |
| 939 } | 947 } |
| 940 | 948 |
| 941 CacheQueryResult WebBluetoothServiceImpl::QueryCacheForDevice( | 949 CacheQueryResult WebBluetoothServiceImpl::QueryCacheForDevice( |
| 942 const WebBluetoothDeviceId& device_id) { | 950 const WebBluetoothDeviceId& device_id) { |
| 943 const std::string& device_address = | 951 const std::string& device_address = |
| 944 allowed_devices_map_.GetDeviceAddress(GetOrigin(), device_id); | 952 allowed_devices_->GetDeviceAddress(device_id); |
| 945 if (device_address.empty()) { | 953 if (device_address.empty()) { |
| 946 CrashRendererAndClosePipe(bad_message::BDH_DEVICE_NOT_ALLOWED_FOR_ORIGIN); | 954 CrashRendererAndClosePipe(bad_message::BDH_DEVICE_NOT_ALLOWED_FOR_ORIGIN); |
| 947 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); | 955 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); |
| 948 } | 956 } |
| 949 | 957 |
| 950 CacheQueryResult result; | 958 CacheQueryResult result; |
| 951 result.device = GetAdapter()->GetDevice(device_address); | 959 result.device = GetAdapter()->GetDevice(device_address); |
| 952 | 960 |
| 953 // When a device can't be found in the BluetoothAdapter, that generally | 961 // When a device can't be found in the BluetoothAdapter, that generally |
| 954 // indicates that it's gone out of range. We reject with a NetworkError in | 962 // indicates that it's gone out of range. We reject with a NetworkError in |
| 955 // that case. | 963 // that case. |
| 956 if (result.device == nullptr) { | 964 if (result.device == nullptr) { |
| 957 result.outcome = CacheQueryOutcome::NO_DEVICE; | 965 result.outcome = CacheQueryOutcome::NO_DEVICE; |
| 958 } | 966 } |
| 959 return result; | 967 return result; |
| 960 } | 968 } |
| 961 | 969 |
| 962 CacheQueryResult WebBluetoothServiceImpl::QueryCacheForService( | 970 CacheQueryResult WebBluetoothServiceImpl::QueryCacheForService( |
| 963 const std::string& service_instance_id) { | 971 const std::string& service_instance_id) { |
| 964 auto device_iter = service_id_to_device_address_.find(service_instance_id); | 972 auto device_iter = service_id_to_device_address_.find(service_instance_id); |
| 965 | 973 |
| 966 // Kill the render, see "ID Not in Map Note" above. | 974 // Kill the render, see "ID Not in Map Note" above. |
| 967 if (device_iter == service_id_to_device_address_.end()) { | 975 if (device_iter == service_id_to_device_address_.end()) { |
| 968 CrashRendererAndClosePipe(bad_message::BDH_INVALID_SERVICE_ID); | 976 CrashRendererAndClosePipe(bad_message::BDH_INVALID_SERVICE_ID); |
| 969 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); | 977 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); |
| 970 } | 978 } |
| 971 | 979 |
| 972 const WebBluetoothDeviceId* device_id = | 980 const WebBluetoothDeviceId* device_id = |
| 973 allowed_devices_map_.GetDeviceId(GetOrigin(), device_iter->second); | 981 allowed_devices_->GetDeviceId(device_iter->second); |
| 974 // Kill the renderer if origin is not allowed to access the device. | 982 // Kill the renderer if origin is not allowed to access the device. |
| 975 if (device_id == nullptr) { | 983 if (device_id == nullptr) { |
| 976 CrashRendererAndClosePipe(bad_message::BDH_DEVICE_NOT_ALLOWED_FOR_ORIGIN); | 984 CrashRendererAndClosePipe(bad_message::BDH_DEVICE_NOT_ALLOWED_FOR_ORIGIN); |
| 977 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); | 985 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); |
| 978 } | 986 } |
| 979 | 987 |
| 980 CacheQueryResult result = QueryCacheForDevice(*device_id); | 988 CacheQueryResult result = QueryCacheForDevice(*device_id); |
| 981 if (result.outcome != CacheQueryOutcome::SUCCESS) { | 989 if (result.outcome != CacheQueryOutcome::SUCCESS) { |
| 982 return result; | 990 return result; |
| 983 } | 991 } |
| 984 | 992 |
| 985 result.service = result.device->GetGattService(service_instance_id); | 993 result.service = result.device->GetGattService(service_instance_id); |
| 986 if (result.service == nullptr) { | 994 if (result.service == nullptr) { |
| 987 result.outcome = CacheQueryOutcome::NO_SERVICE; | 995 result.outcome = CacheQueryOutcome::NO_SERVICE; |
| 988 } else if (!allowed_devices_map_.IsOriginAllowedToAccessService( | 996 } else if (!allowed_devices_->IsAllowedToAccessService( |
| 989 GetOrigin(), *device_id, result.service->GetUUID())) { | 997 *device_id, result.service->GetUUID())) { |
| 990 CrashRendererAndClosePipe(bad_message::BDH_SERVICE_NOT_ALLOWED_FOR_ORIGIN); | 998 CrashRendererAndClosePipe(bad_message::BDH_SERVICE_NOT_ALLOWED_FOR_ORIGIN); |
| 991 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); | 999 return CacheQueryResult(CacheQueryOutcome::BAD_RENDERER); |
| 992 } | 1000 } |
| 993 return result; | 1001 return result; |
| 994 } | 1002 } |
| 995 | 1003 |
| 996 CacheQueryResult WebBluetoothServiceImpl::QueryCacheForCharacteristic( | 1004 CacheQueryResult WebBluetoothServiceImpl::QueryCacheForCharacteristic( |
| 997 const std::string& characteristic_instance_id) { | 1005 const std::string& characteristic_instance_id) { |
| 998 auto characteristic_iter = | 1006 auto characteristic_iter = |
| 999 characteristic_id_to_service_id_.find(characteristic_instance_id); | 1007 characteristic_id_to_service_id_.find(characteristic_instance_id); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1039 } | 1047 } |
| 1040 | 1048 |
| 1041 void WebBluetoothServiceImpl::ClearState() { | 1049 void WebBluetoothServiceImpl::ClearState() { |
| 1042 characteristic_id_to_notify_session_.clear(); | 1050 characteristic_id_to_notify_session_.clear(); |
| 1043 pending_primary_services_requests_.clear(); | 1051 pending_primary_services_requests_.clear(); |
| 1044 descriptor_id_to_characteristic_id_.clear(); | 1052 descriptor_id_to_characteristic_id_.clear(); |
| 1045 characteristic_id_to_service_id_.clear(); | 1053 characteristic_id_to_service_id_.clear(); |
| 1046 service_id_to_device_address_.clear(); | 1054 service_id_to_device_address_.clear(); |
| 1047 connected_devices_.reset( | 1055 connected_devices_.reset( |
| 1048 new FrameConnectedBluetoothDevices(render_frame_host_)); | 1056 new FrameConnectedBluetoothDevices(render_frame_host_)); |
| 1049 allowed_devices_map_ = BluetoothAllowedDevicesMap(); | |
| 1050 device_chooser_controller_.reset(); | 1057 device_chooser_controller_.reset(); |
| 1051 BluetoothAdapterFactoryWrapper::Get().ReleaseAdapter(this); | 1058 BluetoothAdapterFactoryWrapper::Get().ReleaseAdapter(this); |
| 1052 } | 1059 } |
| 1053 | 1060 |
| 1054 } // namespace content | 1061 } // namespace content |
| OLD | NEW |