Index: content/browser/bluetooth/bluetooth_dispatcher_host.h |
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.h b/content/browser/bluetooth/bluetooth_dispatcher_host.h |
index cc6cd9d5cb21ad43b4cfe9e008f373a6053b5fd7..8a8714f17bf49c1a84d065a7ba5dfe001ec64d03 100644 |
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.h |
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h |
@@ -187,7 +187,10 @@ class CONTENT_EXPORT BluetoothDispatcherHost final |
// sessions when other sessions are active. |
base::Timer discovery_session_timer_; |
- // Must be last member, see base/memory/weak_ptr.h documentation |
+ // |weak_ptr_on_ui_thread_| provides weak pointers, e.g. for callbacks, and |
+ // because it exists and has been bound to the UI thread enforces that all |
+ // copies verify they are also used on the UI thread. |
+ base::WeakPtr<BluetoothDispatcherHost> weak_ptr_on_ui_thread_; |
base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); |