bluetooth: Refactor code in //ash/system/bluetooth/ to use Bluetooth System |
|||
Issue descriptionBluetooth System is the new Mojo interface that will replace the C++ Bluetooth API. We need to refactor the Ash code to use the new Mojo Interface. Plan at: https://docs.google.com/document/d/19IBbYaduKjGlsO5duskjI0AsxoClVo9u1P1u7jn_RSs/edit#
,
Sep 10
,
Sep 10
Seems reasonable to me. You might want to ask someone in //ash/system/OWNERS to take a peek. I haven't worked on the tray recently, and tetsui@ and company recently rebuilt the entire UI.
,
Sep 11
tetsui, stevenjb: would you mind taking a look at the design doc in the description?
,
Sep 11
SGTM.
,
Sep 11
tetsui@ - What's the timeline for purging the old system tray code? It might be nicer to just eliminate TrayBluetoothHelper and use the mojo interface directly in the tray code.
,
Sep 12
I will start removing the old code after the launch is approved. Unified System Tray is planned to launch in M70, so it will be late M71 or M72. We don't have to wait for old system tray removal, because it only removes TrayBluetooth, and it's a small fraction of overall TrayBluetoothHelper usage. https://cs.chromium.org/chromium/src/ash/system/bluetooth/tray_bluetooth.cc?rcl=0f7afce461a769f2b06bdfa05a7976463546002b
,
Sep 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7504077ef5191493914ebee0f03d5a897acb5ce6 commit 7504077ef5191493914ebee0f03d5a897acb5ce6 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Mon Sep 24 00:40:11 2018 Add Feature to control the usage of BluetoothSystem The BluetoothSystem Mojo interface will replace the current Bluetooth API. This introduces a Feature to use BluetoothSystem. Bug: 882346 Change-Id: I9b0bd963642cdcd887c03124f8af1e2fa150d07e Reviewed-on: https://chromium-review.googlesource.com/1235364 Reviewed-by: James Cook <jamescook@chromium.org> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#593463} [modify] https://crrev.com/7504077ef5191493914ebee0f03d5a897acb5ce6/ash/public/cpp/ash_features.cc [modify] https://crrev.com/7504077ef5191493914ebee0f03d5a897acb5ce6/ash/public/cpp/ash_features.h
,
Sep 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e4e2c146d95eec0b0eb19fedfcef889542474429 commit e4e2c146d95eec0b0eb19fedfcef889542474429 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Mon Sep 24 01:29:05 2018 ash:bluetooth: Replace GetBluetoothAvailable() and GetBluetoothEnabled() In preparation for BluetoothSystem, this CL replaces GetBluetoothAvailable() and GetBluetoothEnabled() with GetBluetoothState() and changes clients to use it. Bug: 882346 Change-Id: Ibc095ab9ee79561aeb9d145e5a73ffae389574e3 Reviewed-on: https://chromium-review.googlesource.com/1233276 Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Cr-Commit-Position: refs/heads/master@{#593468} [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/BUILD.gn [add] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/DEPS [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/bluetooth_detailed_view.cc [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/bluetooth_detailed_view.h [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/bluetooth_feature_pod_controller.cc [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/tray_bluetooth.cc [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/tray_bluetooth_helper.cc [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/tray_bluetooth_helper.h [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/ash/system/bluetooth/tray_bluetooth_helper_unittest.cc [modify] https://crrev.com/e4e2c146d95eec0b0eb19fedfcef889542474429/services/device/public/mojom/bluetooth_system.mojom
,
Oct 10
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/55aa5d8f4e265bd08217848300f1f038e553eb03 commit 55aa5d8f4e265bd08217848300f1f038e553eb03 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Wed Oct 10 05:33:34 2018 bluetooth: Virtualize TrayBluetoothHelper and add two implementations Makes TrayBluetoothHelper's methods virtual and adds two subclasses: TrayBluetoothHelperLegacy and TrayBluetoothHelperExperimental. TrayBluetoothHelperLegacy uses the soon-to-be-deprecated //device/bluetooth APIs. TrayBluetoothHelperExperimental uses the new BluetoothSystem Mojo Interface. Bug: 882346 Change-Id: I333e507522bd35bb1434a10f94ae74c25449ab1a Reviewed-on: https://chromium-review.googlesource.com/c/1267636 Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#598219} [modify] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/BUILD.gn [modify] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/shell.cc [modify] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/DEPS [modify] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/tray_bluetooth_helper.cc [modify] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/tray_bluetooth_helper.h [add] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/tray_bluetooth_helper_experimental.cc [add] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/tray_bluetooth_helper_experimental.h [add] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc [add] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/tray_bluetooth_helper_legacy.h [rename] https://crrev.com/55aa5d8f4e265bd08217848300f1f038e553eb03/ash/system/bluetooth/tray_bluetooth_helper_legacy_unittest.cc
,
Oct 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c87b6f34e85ea9955986fbca7869b98b449dddf5 commit c87b6f34e85ea9955986fbca7869b98b449dddf5 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Tue Oct 16 04:44:41 2018 bluetooth: Implement TrayBluetoothHelperExperimental::GetBluetoothState Implements GetBluetoothState() by using the new BluetoothSystem mojo interface. Bug: 882346 Change-Id: I75f11b9de33c98e2913aeb08a1e5e085532e803d Reviewed-on: https://chromium-review.googlesource.com/c/1272957 Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Cr-Commit-Position: refs/heads/master@{#599854} [modify] https://crrev.com/c87b6f34e85ea9955986fbca7869b98b449dddf5/ash/manifest.json [modify] https://crrev.com/c87b6f34e85ea9955986fbca7869b98b449dddf5/ash/shell.cc [modify] https://crrev.com/c87b6f34e85ea9955986fbca7869b98b449dddf5/ash/system/bluetooth/tray_bluetooth_helper_experimental.cc [modify] https://crrev.com/c87b6f34e85ea9955986fbca7869b98b449dddf5/ash/system/bluetooth/tray_bluetooth_helper_experimental.h [modify] https://crrev.com/c87b6f34e85ea9955986fbca7869b98b449dddf5/content/public/app/mojo/content_browser_manifest.json
,
Nov 6
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd4717da27b81fa6d0f4e5ce173f8e89c6bb06ef commit bd4717da27b81fa6d0f4e5ce173f8e89c6bb06ef Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Tue Nov 06 01:57:08 2018 bluetooth: Simplify UpdateBluetoothDeviceListHelper Rather than manually iterating over the vector and removing elements, use the base::EraseIf() helper function. Bug: 882346 Change-Id: If7c608239ae5081b6e4750dc5a4c33439a18b0a6 Reviewed-on: https://chromium-review.googlesource.com/c/1316978 Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#605565} [modify] https://crrev.com/bd4717da27b81fa6d0f4e5ce173f8e89c6bb06ef/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc
,
Nov 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f1f10378073b916eb932a85a097009f2ec51b611 commit f1f10378073b916eb932a85a097009f2ec51b611 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Wed Nov 07 03:56:21 2018 bluetooth: Refactor UnifiedBluetoothDetailedViewController Changes UnifiedBluetoothDetailedViewController to update the device list every 500ms while a scan is active. Also adds a new observer method specifically for when Bluetooth State changes and changes UnifiedBluetoothDetailedViewController to use this method to update the list of devices as well. Bug: 882346 Change-Id: I13ef2555e6c4c451213afb5d405f707d5f4f19a7 Reviewed-on: https://chromium-review.googlesource.com/c/1314069 Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#605951} [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/bluetooth/bluetooth_feature_pod_controller.cc [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/bluetooth/bluetooth_feature_pod_controller.h [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/bluetooth/bluetooth_observer.h [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/bluetooth/tray_bluetooth_helper_experimental.cc [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/tray/system_tray_notifier.cc [modify] https://crrev.com/f1f10378073b916eb932a85a097009f2ec51b611/ash/system/tray/system_tray_notifier.h
,
Nov 20
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d27769389586ad3adc1436f14589aa42c77c89d commit 5d27769389586ad3adc1436f14589aa42c77c89d Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Tue Nov 20 21:44:53 2018 bluetooth: Stop using SystemTrayNotifier SystemTrayNotifier will be removed, so move the observer list direclty into TrayBluetoothHelper. Bug: 882346 Change-Id: I316a43cc98d879003e378e01994e40038e557f93 Reviewed-on: https://chromium-review.googlesource.com/c/1343588 Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#609811} [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/BUILD.gn [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/bluetooth_feature_pod_controller.cc [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/bluetooth_feature_pod_controller.h [delete] https://crrev.com/85cd2a967787690bf93c9159734b9e94ad25e852/ash/system/bluetooth/bluetooth_observer.h [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/tray_bluetooth_helper.cc [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/tray_bluetooth_helper.h [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/tray_bluetooth_helper_experimental.cc [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/tray/system_tray_notifier.cc [modify] https://crrev.com/5d27769389586ad3adc1436f14589aa42c77c89d/ash/system/tray/system_tray_notifier.h
,
Nov 23
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/791ce9adce596edcb928afbbe8ddf731088dac14 commit 791ce9adce596edcb928afbbe8ddf731088dac14 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Fri Nov 23 03:51:49 2018 bluetooth: Introduce device::mojom::BluetoothDeviceInfo Replace ash::BluetoothDeviceInfo with device::mojom::BluetoothDeviceInfo. The new struct will be returned by the BT System interface and used instead of ash::BluetoothDeviceInfo. Bug: 882346 Change-Id: I01830955e5caef35b430d69e48ae129df47eac8c Reviewed-on: https://chromium-review.googlesource.com/c/1328624 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org> Reviewed-by: Dominick Ng <dominickn@chromium.org> Reviewed-by: Ovidio Henriquez <odejesush@chromium.org> Reviewed-by: Ken Rockot <rockot@google.com> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#610527} [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/BUILD.gn [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/system/bluetooth/bluetooth_detailed_view.cc [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/system/bluetooth/bluetooth_feature_pod_controller.cc [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/system/bluetooth/tray_bluetooth_helper.cc [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/system/bluetooth/tray_bluetooth_helper.h [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/system/bluetooth/tray_bluetooth_helper_legacy_unittest.cc [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/device/bluetooth/strings/BUILD.gn [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/device/BUILD.gn [add] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/device/public/cpp/bluetooth/BUILD.gn [add] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/device/public/cpp/bluetooth/DEPS [add] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/device/public/cpp/bluetooth/bluetooth_utils.cc [add] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/device/public/cpp/bluetooth/bluetooth_utils.h [add] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/device/public/cpp/bluetooth/bluetooth_utils_unittest.cc [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/device/public/mojom/bluetooth_system.mojom [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/test/BUILD.gn [modify] https://crrev.com/791ce9adce596edcb928afbbe8ddf731088dac14/services/test/run_all_service_tests.cc
,
Nov 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e45a6ef0e7aa5f8189640303367165aff2abdeba commit e45a6ef0e7aa5f8189640303367165aff2abdeba Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Tue Nov 27 11:48:04 2018 bluetooth: Query for devices every second in TrayBluetoothHelper Before TrayBluetoothHelper would get notified of any changes to devices. This caused problems in busy environments because TrayBluetoothHelper would get notified hundreds or even thousands of times per second of devices changes. This CL changes to a "pull" pattern where TrayBluetootHelper queries for devices every second. The devices are then cached so that clients of TrayBluetoothHelper can access them synchronously. TrayBluetoothHelper queries for devices as long as the state is kPoweredOn. If the state changes, the device list is cleared. Bug: 882346 TEST=The following actions should be performed: 1. Turn bluetooth on and off in system tray. 2. Open device list in system menu. 3. Connect to a device. 4. See that the pod feature button in the system tray indicates a device is connected when connected to a device. Change-Id: Id9028546a627f260527aa737f51c032f74a447ec Reviewed-on: https://chromium-review.googlesource.com/c/1347638 Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org> Cr-Commit-Position: refs/heads/master@{#611069} [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/bluetooth_feature_pod_controller.cc [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/tray_bluetooth_helper.cc [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/tray_bluetooth_helper.h [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/tray_bluetooth_helper_experimental.cc [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/tray_bluetooth_helper_experimental.h [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/tray_bluetooth_helper_legacy.h [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/tray_bluetooth_helper_legacy_unittest.cc [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc [modify] https://crrev.com/e45a6ef0e7aa5f8189640303367165aff2abdeba/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h
,
Nov 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5 commit adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5 Author: Scott Violet <sky@chromium.org> Date: Tue Nov 27 19:21:10 2018 Revert "bluetooth: Query for devices every second in TrayBluetoothHelper" This reverts commit e45a6ef0e7aa5f8189640303367165aff2abdeba. Reason for revert: This triggers DCHECKs on device, so reverting. Here's the stack: [13255:13255:1127/111259.548287:FATAL:tray_bluetooth_helper.cc(50)] Check failed: !timer_.IsRunning(). #0 0x5abde8c02cef base::debug::StackTrace::StackTrace() #1 0x5abde8b586cb logging::LogMessage::~LogMessage() #2 0x5abdeb50f0a5 ash::TrayBluetoothHelper::StartOrStopRefreshingDeviceList() #3 0x5abde9b4ac48 device::BluetoothAdapter::NotifyAdapterPoweredChanged() #4 0x5abde9b55a5f bluez::BluetoothAdapterBlueZ::SetAdapter() #5 0x5abde9b7d3d5 bluez::BluetoothAdapterClientImpl::ObjectAdded() #6 0x5abde9a471be dbus::ObjectManager::AddInterface() #7 0x5abde9a46d2e dbus::ObjectManager::UpdateObject() #8 0x5abde9a457fb dbus::ObjectManager::OnGetManagedObjects() #9 0x5abde505efdc _ZN4base8internal7InvokerINS0_9BindStateIMN8chromeos14BiodClientImplEFvPN4dbus6SignalEEJNS_7WeakPtrIS4_EEEEEFvS7_EE3RunEPNS0_13BindStateBaseES7_ #10 0x5abde9a486bf dbus::ObjectProxy::OnCallMethod() #11 0x5abde9a4cb43 _ZN4base8internal7InvokerINS0_9BindStateIMN4dbus11ObjectProxyEFvRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_NS_12OnceCallbackIFvPNS3_8ResponseEEEESG_PNS3_13ErrorResponseEEJ13scoped_refptrIS4_ESB_SB_SI_EEEFvSG_SK_EE7RunOnceEPNS0_13BindStateBaseESG_SK_ #12 0x5abde9a49074 dbus::ObjectProxy::RunResponseOrErrorCallback() #13 0x5abde9a4db5e _ZN4base8internal13FunctorTraitsIMN4dbus11ObjectProxyEFvNS3_19ReplyCallbackHolderENS_9TimeTicksEPNS2_8ResponseEPNS2_13ErrorResponseEEvE6InvokeISB_13scoped_refptrIS3_EJS4_S5_S7_S9_EEEvT_OT0_DpOT1_ #14 0x5abde9a4da80 _ZN4base8internal7InvokerINS0_9BindStateIMN4dbus11ObjectProxyEFvNS4_19ReplyCallbackHolderENS_9TimeTicksEPNS3_8ResponseEPNS3_13ErrorResponseEEJ13scoped_refptrIS4_ES5_S6_S8_SA_EEEFvvEE7RunOnceEPNS0_13BindStateBaseE #15 0x5abde8bd218b base::(anonymous namespace)::PostTaskAndReplyRelay::RunTaskAndPostReply() #16 0x5abde8bd260b _ZN4base8internal7InvokerINS0_9BindStateIPFvNS_12_GLOBAL__N_121PostTaskAndReplyRelayEEJS4_EEEFvvEE7RunOnceEPNS0_13BindStateBaseE #17 0x5abde8c28597 base::debug::TaskAnnotator::RunTask() #18 0x5abde8b6242f base::MessageLoopImpl::RunTask() #19 0x5abde8b62ae2 base::MessageLoopImpl::DoWork() #20 0x5abde8c24189 base::MessagePumpLibevent::Run() #21 0x5abde8b61f05 base::MessageLoopImpl::Run() #22 0x5abde8b8c576 base::RunLoop::Run() #23 0x5abde86a22e5 ChromeBrowserMainParts::MainMessageLoopRun() #24 0x5abde5eebb04 content::BrowserMainLoop::RunMainMessageLoopParts() #25 0x5abde5eee503 content::BrowserMainRunnerImpl::Run() #26 0x5abde5ee828f content::BrowserMain() Original change's description: > bluetooth: Query for devices every second in TrayBluetoothHelper > > Before TrayBluetoothHelper would get notified of any changes to devices. > This caused problems in busy environments because TrayBluetoothHelper > would get notified hundreds or even thousands of times per second of > devices changes. > > This CL changes to a "pull" pattern where TrayBluetootHelper queries > for devices every second. The devices are then cached so that clients > of TrayBluetoothHelper can access them synchronously. > > TrayBluetoothHelper queries for devices as long as the state is > kPoweredOn. If the state changes, the device list is cleared. > > Bug: 882346 > > TEST=The following actions should be performed: > > 1. Turn bluetooth on and off in system tray. > 2. Open device list in system menu. > 3. Connect to a device. > 4. See that the pod feature button in the system tray indicates a > device is connected when connected to a device. > > Change-Id: Id9028546a627f260527aa737f51c032f74a447ec > Reviewed-on: https://chromium-review.googlesource.com/c/1347638 > Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> > Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org> > Cr-Commit-Position: refs/heads/master@{#611069} TBR=ortuno@chromium.org,tetsui@chromium.org Change-Id: I5b5ca3f227ab7616321047b3a8ade17bfa30b29a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 882346 Reviewed-on: https://chromium-review.googlesource.com/c/1352340 Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#611246} [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/bluetooth_feature_pod_controller.cc [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/tray_bluetooth_helper.cc [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/tray_bluetooth_helper.h [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/tray_bluetooth_helper_experimental.cc [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/tray_bluetooth_helper_experimental.h [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/tray_bluetooth_helper_legacy.h [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/tray_bluetooth_helper_legacy_unittest.cc [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc [modify] https://crrev.com/adf1da58fcbc9e409d9f0244b8cadf8e1e2b36a5/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h
,
Nov 29
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ec30fd63ea992a96cab69e37f60bce92ef29fde2 commit ec30fd63ea992a96cab69e37f60bce92ef29fde2 Author: Giovanni Ortuño Urquidi <ortuno@chromium.org> Date: Thu Nov 29 00:10:18 2018 Reland "bluetooth: Query for devices every second in TrayBluetoothHelper" This is a reland of e45a6ef0e7aa5f8189640303367165aff2abdeba The original CL was reverted because a DCHECK was being hit. The TrayBluetoothHelperLegacy implementation would sometimes call OnBluetoothSystemStateChanged without the state actually changing which would cause the DCHECK to be hit. A separate CL (https://crrev.com/c/1352123) fixed TrayBluetoothHelperLegacy so now the DCHECK shouldn't be hit. Original change's description: > bluetooth: Query for devices every second in TrayBluetoothHelper > > Before TrayBluetoothHelper would get notified of any changes to devices. > This caused problems in busy environments because TrayBluetoothHelper > would get notified hundreds or even thousands of times per second of > devices changes. > > This CL changes to a "pull" pattern where TrayBluetootHelper queries > for devices every second. The devices are then cached so that clients > of TrayBluetoothHelper can access them synchronously. > > TrayBluetoothHelper queries for devices as long as the state is > kPoweredOn. If the state changes, the device list is cleared. > > Bug: 882346 > > TEST=The following actions should be performed: > > 1. Turn bluetooth on and off in system tray. > 2. Open device list in system menu. > 3. Connect to a device. > 4. See that the pod feature button in the system tray indicates a > device is connected when connected to a device. > > Change-Id: Id9028546a627f260527aa737f51c032f74a447ec > Reviewed-on: https://chromium-review.googlesource.com/c/1347638 > Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> > Reviewed-by: Tetsui Ohkubo <tetsui@chromium.org> > Cr-Commit-Position: refs/heads/master@{#611069} TBR=tetsui@chromium.org Bug: 882346 Change-Id: Ief9ce3d77a317dfde2a5fcc49cb0c598aaa9012d Reviewed-on: https://chromium-review.googlesource.com/c/1352078 Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#611949} [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/bluetooth_feature_pod_controller.cc [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/tray_bluetooth_helper.cc [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/tray_bluetooth_helper.h [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/tray_bluetooth_helper_experimental.cc [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/tray_bluetooth_helper_experimental.h [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/tray_bluetooth_helper_legacy.h [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/tray_bluetooth_helper_legacy_unittest.cc [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc [modify] https://crrev.com/ec30fd63ea992a96cab69e37f60bce92ef29fde2/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h |
|||
►
Sign in to add a comment |
|||
Comment 1 by ortuno@chromium.org
, Sep 10