New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 812468 link

Starred by 4 users

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 862849

Blocking:
issue 807430



Sign in to add a comment

Implement pure bluez forwarder in btdispatch

Project Member Reported by sonnysasaka@chromium.org, Feb 15 2018

Issue description

As the first phase of the bluetooth dispatcher, newblued is to forward all incoming requests to bluez, and forward all incoming signals from bluez to listeners.
 
Blocking: 807430
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/a3cee8c6def242deb7227fe542e864b08f43860f

commit a3cee8c6def242deb7227fe542e864b08f43860f
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Sat Feb 17 02:48:01 2018

bluetooth: Separate suspend/resume handling to its own class.

bluetooth::Daemon is going to grow to handle an additional concern:
bluez/newblue dispatcher. Therefore it's more manageable to separate the
concern of suspend/resume handling and bluez/newblue dispatcher to their
own classes, and bluetooth::Daemon will tie together those services.

BUG=chromium:812468
TEST=Unit test should succeed to confirm there is no behavior changes.

Change-Id: I68679750bf6ccb61e54cc28b11fcd4a316531738
Reviewed-on: https://chromium-review.googlesource.com/920648
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/a3cee8c6def242deb7227fe542e864b08f43860f/bluetooth/bluetooth.gyp
[modify] https://crrev.com/a3cee8c6def242deb7227fe542e864b08f43860f/bluetooth/newblued/daemon.cc
[modify] https://crrev.com/a3cee8c6def242deb7227fe542e864b08f43860f/bluetooth/newblued/daemon_unittest.cc
[modify] https://crrev.com/a3cee8c6def242deb7227fe542e864b08f43860f/bluetooth/newblued/daemon.h
[add] https://crrev.com/a3cee8c6def242deb7227fe542e864b08f43860f/bluetooth/newblued/suspend_manager.h
[add] https://crrev.com/a3cee8c6def242deb7227fe542e864b08f43860f/bluetooth/newblued/suspend_manager.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/external/libbrillo/+/037e08dae3b6c1b288ac35b35245c7d8bed84a58

commit 037e08dae3b6c1b288ac35b35245c7d8bed84a58
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 02 21:25:17 2018

libbrillo: Support custom D-Bus property handlers

This CL is to allow clients of DBusObject to implement their own custom
property method handlers (GetAll/Get/Set). Possible use cases include:
* handling Set method call to be forwarded to another D-Bus service
* handling Set method call to trigger some operation other than setting
  the property value itself.
* handling Get method call to return a value which is a function of
  other properties' values.

BUG=chromium:812468
TEST=Tested with Bluetooth daemon that forwards Set method call.

Change-Id: I8294dc46885b2105adceb9c144f4d603185e49ff
Reviewed-on: https://chromium-review.googlesource.com/939263
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/037e08dae3b6c1b288ac35b35245c7d8bed84a58/brillo/dbus/dbus_object.cc
[modify] https://crrev.com/037e08dae3b6c1b288ac35b35245c7d8bed84a58/brillo/dbus/dbus_object.h

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/a425336243e11822c918297d50dddc8502978113

commit a425336243e11822c918297d50dddc8502978113
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 09 01:01:11 2018

libchrome: Add more type specializations for dbus::Property

The additional type specializations are required for Bluetooth daemon.
This is a cherry-pick of https://crrev.com/2369423003 and
https://crrev.com/2421713002 of dbus/ subdirectory.

BUG=chromium:812468
TEST=emerge-$BOARD libchrome

Change-Id: I3c218f52acb17e5450fca5ac42a27ae875a2f078
Reviewed-on: https://chromium-review.googlesource.com/954046
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>

[modify] https://crrev.com/a425336243e11822c918297d50dddc8502978113/chromeos-base/libchrome/libchrome-395517.ebuild
[rename] https://crrev.com/a425336243e11822c918297d50dddc8502978113/chromeos-base/libchrome/libchrome-395517-r22.ebuild
[add] https://crrev.com/a425336243e11822c918297d50dddc8502978113/chromeos-base/libchrome/files/libchrome-395517-dbus-Property-Add-type-specializations.patch

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/external/libbrillo/+/91b37e06780bea8aaa7e80299683460db1b64f55

commit 91b37e06780bea8aaa7e80299683460db1b64f55
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Sat Mar 10 04:05:30 2018

libbrillo: Support adding/removing interfaces and their properties.

D-Bus specification allows interfaces to be added or removed even after
an object is exported. This CL adds the support to libbrillo's D-Bus
library to do this.

This is needed by the new Bluetooth daemon which is going to impersonate
BlueZ's ObjectManager and BlueZ may add/remove interfaces of an object
dynamically.

BUG=chromium:812468
TEST=Tested with Bluetooth daemon

Change-Id: Ia72735bfd28082cf6c43d1e774beb912fa60ec2d
Reviewed-on: https://chromium-review.googlesource.com/956745
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/91b37e06780bea8aaa7e80299683460db1b64f55/brillo/dbus/dbus_object_unittest.cc
[modify] https://crrev.com/91b37e06780bea8aaa7e80299683460db1b64f55/brillo/dbus/dbus_object.h
[modify] https://crrev.com/91b37e06780bea8aaa7e80299683460db1b64f55/brillo/dbus/dbus_object.cc
[modify] https://crrev.com/91b37e06780bea8aaa7e80299683460db1b64f55/brillo/dbus/exported_property_set_unittest.cc
[modify] https://crrev.com/91b37e06780bea8aaa7e80299683460db1b64f55/brillo/dbus/exported_property_set.h
[modify] https://crrev.com/91b37e06780bea8aaa7e80299683460db1b64f55/brillo/dbus/exported_property_set.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Mar 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/2390a6dd111bea1ee9220c34588255be79b36751

commit 2390a6dd111bea1ee9220c34588255be79b36751
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Sat Mar 10 09:27:51 2018

bluetooth: Move DaemonTest to SuspendManagerTest

The current DaemonTest exercises detailed code paths of SuspendManager
and this test is more suitable to be a unit test of SuspendManager. This
prepares for the upcoming CL of adding BlueZ forwarding in Daemon and
DaemonTest should then contain the integration tests exercising both
SuspendManager and BlueZ forwarding.

BUG=chromium:812468
TEST=Ran the moved unit test

Change-Id: Ibc91ebe51ade7767907d2118717fe409fb246094
Reviewed-on: https://chromium-review.googlesource.com/958129
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/2390a6dd111bea1ee9220c34588255be79b36751/bluetooth/bluetooth.gyp
[rename] https://crrev.com/2390a6dd111bea1ee9220c34588255be79b36751/bluetooth/newblued/suspend_manager_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aea1848182c7f4fe73221787bdb4e2f3369e9bcd

commit aea1848182c7f4fe73221787bdb4e2f3369e9bcd
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Mon Mar 12 19:31:27 2018

dbus: Filter signal by the sender we are interested in only.

This adds sender='<name>' filter as the match rule for subscribing to
signal in ObjectProxy. This is needed to reduce the unnecessary polluted
log of rejecting some signals. The manual sender verification is still
needed because as mentioned in
https://bugs.chromium.org/p/chromium/issues/detail?id=507206#c14
service_name_ might be empty and sender='' means to not filter by sender
at all.

BUG=chromium:812468
TEST=Tested on device and checked that communications to D-Bus services
(e.g. power, bluetooth) don't break

Change-Id: I0ef4e03b5d9d8aa4412ef97286b971c30f458e99
Reviewed-on: https://chromium-review.googlesource.com/958324
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542567}
[modify] https://crrev.com/aea1848182c7f4fe73221787bdb4e2f3369e9bcd/dbus/object_proxy.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bd3098c6e3492fd316b95b11a4927ef07d6a108c

commit bd3098c6e3492fd316b95b11a4927ef07d6a108c
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Mar 13 00:59:50 2018

Replace std::unordered_map with std::map for dbus::Property

std::map is more preferable than std::unordered_map:
https://chromium.googlesource.com/chromium/src/+/master/base/containers/README.md.
For newblue's dispatcher std::map for dbus::Property is required to
match with libbrillo ExportedProperty.

BUG=chromium:812468
TEST=Unit test still passes, manual test on device exercising Bluetooth
device discovery.

Change-Id: I378c383a612fd40997b44191a1ba6df33aa6899d
Reviewed-on: https://chromium-review.googlesource.com/959362
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542677}
[modify] https://crrev.com/bd3098c6e3492fd316b95b11a4927ef07d6a108c/dbus/property.cc
[modify] https://crrev.com/bd3098c6e3492fd316b95b11a4927ef07d6a108c/dbus/property.h
[modify] https://crrev.com/bd3098c6e3492fd316b95b11a4927ef07d6a108c/dbus/property_unittest.cc
[modify] https://crrev.com/bd3098c6e3492fd316b95b11a4927ef07d6a108c/device/bluetooth/dbus/bluetooth_device_client.h
[modify] https://crrev.com/bd3098c6e3492fd316b95b11a4927ef07d6a108c/device/bluetooth/dbus/fake_bluetooth_device_client.cc
[modify] https://crrev.com/bd3098c6e3492fd316b95b11a4927ef07d6a108c/device/bluetooth/dbus/fake_bluetooth_device_client.h
[modify] https://crrev.com/bd3098c6e3492fd316b95b11a4927ef07d6a108c/device/bluetooth/test/bluetooth_test_bluez.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/1e83c25148846c95e7a2b3df6f3e71d82720cafb

commit 1e83c25148846c95e7a2b3df6f3e71d82720cafb
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Mar 13 14:36:53 2018

bluetooth: Add bluez object manager service constants.

This is a transitional change as Chrome will migrate to
kBluezObjectManager and kBluetoothObjectManager will be modified to
point to newblued's service name (org.chromium.Bluetooth).

BUG=chromium:812468
TEST=None

Change-Id: Ic5a42c3875ef57548d35056d46ec39bd63da05be
Reviewed-on: https://chromium-review.googlesource.com/959342
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>

[modify] https://crrev.com/1e83c25148846c95e7a2b3df6f3e71d82720cafb/dbus/service_constants.h

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0d304140bf1dfb5226b9865e3b2c224246937ae8

commit 0d304140bf1dfb5226b9865e3b2c224246937ae8
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Mar 13 14:37:01 2018

libchrome: Replace std::unordered_map with std::map for dbus::Property

std::map is more preferable than std::unordered_map. For newblue's
dispatcher std::map for dbus::Property is required to match with
libbrillo ExportedProperty.

This is a cherry-pick of http://crosreview.com/959362.

BUG=chromium:812468
TEST=Tested with newblue daemon

Change-Id: Icb8fe539ec024b3464a35a1b1c9aea803a5b1828
Reviewed-on: https://chromium-review.googlesource.com/959619
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>

[rename] https://crrev.com/0d304140bf1dfb5226b9865e3b2c224246937ae8/chromeos-base/libchrome/libchrome-395517-r24.ebuild
[modify] https://crrev.com/0d304140bf1dfb5226b9865e3b2c224246937ae8/chromeos-base/libchrome/libchrome-395517.ebuild
[add] https://crrev.com/0d304140bf1dfb5226b9865e3b2c224246937ae8/chromeos-base/libchrome/files/libchrome-395517-Replace-std-unordered_map-with-std-map-for-dbus-Prop.patch

Project Member

Comment 11 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/540244ed4952574c2bb88ac553397e47e5f03c4e

commit 540244ed4952574c2bb88ac553397e47e5f03c4e
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Mar 13 21:10:28 2018

Roll src/third_party/cros_system_api/ e22d01d97..1e83c2514 (3 commits)

https://chromium.googlesource.com/chromiumos/platform/system_api.git/+log/e22d01d973dc..1e83c2514884

$ git log e22d01d97..1e83c2514 --date=short --no-merges --format='%ad %ae %s'
2018-03-12 sonnysasaka bluetooth: Add bluez object manager service constants.
2018-02-15 ljusten authpolicy: Add unspecific kpasswd error
2018-03-07 jkardatzke Add D-Bus signal for starting a container in a VM

Created with:
  roll-dep src/third_party/cros_system_api

Bug: 812468

Change-Id: Ia9f3ecd344f8203b145797baac73e733c3449a15
Reviewed-on: https://chromium-review.googlesource.com/961128
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Commit-Queue: Rahul Chaturvedi <rkc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542909}
[modify] https://crrev.com/540244ed4952574c2bb88ac553397e47e5f03c4e/DEPS

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/cd67f2a34777b3dcd676f59a49b8722f20c87a86

commit cd67f2a34777b3dcd676f59a49b8722f20c87a86
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Mar 14 02:00:05 2018

bluetooth: Add more verbose log for SuspendManager

BUG=chromium:812468
TEST=Ran newblued with --vmodule=*/bluetooth/*=1

Change-Id: I1e8561be360a43dfb18289185364d9f95d00bf0d
Reviewed-on: https://chromium-review.googlesource.com/959528
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/cd67f2a34777b3dcd676f59a49b8722f20c87a86/bluetooth/init/upstart/newblued.conf
[modify] https://crrev.com/cd67f2a34777b3dcd676f59a49b8722f20c87a86/bluetooth/newblued/suspend_manager.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Mar 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3a9ccc8fecd3a76552363688494da8da776cd50b

commit 3a9ccc8fecd3a76552363688494da8da776cd50b
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Mar 14 02:00:03 2018

libchrome: Filter signal by the sender we are interested in only.

This adds sender='<name>' filter as the match rule for subscribing to
signal in ObjectProxy. This is needed to reduce the unnecessary polluted
log of rejecting some signals. The manual sender verification is still
needed because as mentioned in
https://bugs.chromium.org/p/chromium/issues/detail?id=507206#c14
service_name_ might be empty and sender='' means to not filter by sender
at all.

This is a cherry-pick of http://crosreview.com/958324.

BUG=chromium:812468
TEST=Tested with newblue daemon

Change-Id: Ia9111559799a1354006b3599dca43a6b0c30bdd8
Reviewed-on: https://chromium-review.googlesource.com/958039
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>

[modify] https://crrev.com/3a9ccc8fecd3a76552363688494da8da776cd50b/chromeos-base/libchrome/libchrome-395517.ebuild
[add] https://crrev.com/3a9ccc8fecd3a76552363688494da8da776cd50b/chromeos-base/libchrome/files/libchrome-395517-dbus-Filter-signal-by-the-sender-we-are-interested-i.patch
[rename] https://crrev.com/3a9ccc8fecd3a76552363688494da8da776cd50b/chromeos-base/libchrome/libchrome-395517-r25.ebuild

Project Member

Comment 14 by bugdroid1@chromium.org, Mar 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/external/libbrillo/+/50228d6f8d28b6c5802b0b8ef462a7a5e5d1bac0

commit 50228d6f8d28b6c5802b0b8ef462a7a5e5d1bac0
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 16 20:30:01 2018

libbrillo: Expose DBusObject of ExportedObjectManager.

ExportedObjectManager subscribes to signals on interface
org.freedesktop.DBus.ObjectManager. In D-Bus forwarding case, it may
receive expected signals from the forwarded service about
InterfacesAdded and InterfacesRemoved but it would be logged as
unexpected method calls and pollute the logs. There needs to be a way to
freely attach method handlers to the expected methods so we can handle
them instead of unnecessarily polluting the logs.

BUG=chromium:812468
TEST=Tested with Bluetooth daemon D-Bus forwarding

Change-Id: Ifb26a2d7ce800fde4311b18efe36ab5110f0dae4
Reviewed-on: https://chromium-review.googlesource.com/958325
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/50228d6f8d28b6c5802b0b8ef462a7a5e5d1bac0/brillo/dbus/exported_object_manager.h

Project Member

Comment 15 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/810f4858c341b83460d777dc3e1b2207cbcbdc37

commit 810f4858c341b83460d777dc3e1b2207cbcbdc37
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Mar 20 02:21:40 2018

bluetooth: Refactor D-Bus service watcher into its own class.

Separating service watching concern into its own class will make it
reusable to Bluetooth dispatcher in the upcoming CLs.

Also added the D-Bus policy file for the dispatcher.

BUG=chromium:812468
TEST=Unit tests don't regress

Change-Id: I1e4bde6f001989a9680cabb779062ad3fc5de220
Reviewed-on: https://chromium-review.googlesource.com/962834
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/810f4858c341b83460d777dc3e1b2207cbcbdc37/bluetooth/newblued/suspend_manager_unittest.cc
[modify] https://crrev.com/810f4858c341b83460d777dc3e1b2207cbcbdc37/bluetooth/newblued/suspend_manager.h
[add] https://crrev.com/810f4858c341b83460d777dc3e1b2207cbcbdc37/bluetooth/dbus/org.chromium.Bluetooth.conf
[modify] https://crrev.com/810f4858c341b83460d777dc3e1b2207cbcbdc37/bluetooth/bluetooth.gyp
[add] https://crrev.com/810f4858c341b83460d777dc3e1b2207cbcbdc37/bluetooth/newblued/service_watcher.cc
[add] https://crrev.com/810f4858c341b83460d777dc3e1b2207cbcbdc37/bluetooth/newblued/service_watcher.h
[modify] https://crrev.com/810f4858c341b83460d777dc3e1b2207cbcbdc37/bluetooth/newblued/suspend_manager.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Mar 21 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/53618a637e63c19b0dd6a32c2111a159383a2593

commit 53618a637e63c19b0dd6a32c2111a159383a2593
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Mar 21 05:21:30 2018

bluetooth: Install dbus policy file

BUG=chromium:812468
TEST=emerge-$BOARD bluetooth, install to device, check that newblued can
successfully request name ownership of org.chromium.Bluetooth.

Change-Id: I50211097e12da2cb1d010d655db45da9a3dcac10
Reviewed-on: https://chromium-review.googlesource.com/959626
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/53618a637e63c19b0dd6a32c2111a159383a2593/chromeos-base/bluetooth/bluetooth-9999.ebuild

Project Member

Comment 17 by bugdroid1@chromium.org, Mar 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e

commit 2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Mar 22 17:43:16 2018

Add feature to enable use of newblue daemon

This CL adds feature to enable/disable the use of newblue Bluetooth
daemon instead of BlueZ. This is only the Chrome-level switch and does
not include the lower-level switch to enable kernel splitter and
bluetoothd/newblued restarts. That will be done separately.

BUG=chromium:812468
TEST=Unit tests still pass, manual device test doesn't regress.

Change-Id: I8ce9625040e0abb6f20f8707fafc897caa898ac8
Reviewed-on: https://chromium-review.googlesource.com/961498
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545140}
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/chrome/browser/about_flags.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/base/features.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/base/features.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/BUILD.gn
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_adapter_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_device_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_input_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_media_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_media_transport_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluez_dbus_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/bluez_dbus_manager.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_adapter_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_adapter_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_agent_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_agent_manager_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_device_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_device_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_manager_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_input_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_input_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_media_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_media_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_media_transport_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_profile_manager_client.cc
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/device/bluetooth/dbus/fake_bluetooth_profile_manager_client.h
[modify] https://crrev.com/2d200438a4f7a19cfa92dafb39a429dd1ec1fa7e/tools/metrics/histograms/enums.xml

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/959098c98b544f3d2e3b54c1896b4687bbd906e1

commit 959098c98b544f3d2e3b54c1896b4687bbd906e1
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 23 21:50:40 2018

bluetooth: Rename newblued to btdispatch

CQ-DEPEND=CL:974504
BUG=chromium:812468
TEST=Tested with CL:974504

Change-Id: Iff1dee640d55e16b560a2d82c6ec98e570d21bc7
Reviewed-on: https://chromium-review.googlesource.com/974479
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/959098c98b544f3d2e3b54c1896b4687bbd906e1/chromeos-base/bluetooth/bluetooth-9999.ebuild

Project Member

Comment 19 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5

commit 6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 23 21:50:41 2018

bluetooth: Rename newblued to btdispatch

Current design is that the newblued binary does two things: dispatching
to bluez and handling with newblue. It is redesigned to be split into a
dispatcher and the real newblued.

CQ-DEPEND=CL:974479
BUG=chromium:812468
TEST=Tested with the transition ebuild

Change-Id: I8b2f546767e411250ab318356d9620471b658678
Reviewed-on: https://chromium-review.googlesource.com/974504
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/suspend_manager_unittest.cc
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/suspend_manager.h
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/main.cc
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/service_watcher.h
[modify] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/bluetooth.gyp
[modify] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/README.md
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/seccomp_filters/btdispatch-seccomp-arm.policy
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/complete_mock_object_proxy.h
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/init/upstart/btdispatch.conf
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/daemon.cc
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/daemon.h
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/seccomp_filters/btdispatch-seccomp-amd64.policy
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/service_watcher.cc
[rename] https://crrev.com/6d60f5ae47682dd43d66d5bf0ea5fed002a3aff5/bluetooth/dispatcher/suspend_manager.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Mar 24 2018

Project Member

Comment 21 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/b24ca1aa34f71efae2de05a277fa8e56ac752f26

commit b24ca1aa34f71efae2de05a277fa8e56ac752f26
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Mar 27 03:16:44 2018

bluetooth: Add interface for multiplexing ObjectManager::Interface

The libchrome D-Bus library doesn't have the API to listen to an
interface from multiple D-Bus services. This CL adds wrapper API so that
it's possible to do so.

BUG=chromium:812468
TEST=Added unit test

Change-Id: Id82e4fc63597d7b8ab360de0bb6d25bc48e32635
Reviewed-on: https://chromium-review.googlesource.com/978786
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/b24ca1aa34f71efae2de05a277fa8e56ac752f26/bluetooth/dispatcher/main.cc
[add] https://crrev.com/b24ca1aa34f71efae2de05a277fa8e56ac752f26/bluetooth/dispatcher/mock_object_manager_interface_multiplexer.h
[modify] https://crrev.com/b24ca1aa34f71efae2de05a277fa8e56ac752f26/bluetooth/bluetooth.gyp
[add] https://crrev.com/b24ca1aa34f71efae2de05a277fa8e56ac752f26/bluetooth/dispatcher/object_manager_interface_multiplexer_unittest.cc
[add] https://crrev.com/b24ca1aa34f71efae2de05a277fa8e56ac752f26/bluetooth/dispatcher/object_manager_interface_multiplexer.cc
[add] https://crrev.com/b24ca1aa34f71efae2de05a277fa8e56ac752f26/bluetooth/dispatcher/object_manager_interface_multiplexer.h

Project Member

Comment 22 by bugdroid1@chromium.org, Mar 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/ad3e546d63508584f47d3295f1ed0545840068f6

commit ad3e546d63508584f47d3295f1ed0545840068f6
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Mar 29 02:34:24 2018

bluetooth: Fix memory leak in test

BUG=chromium:826850,chromium:812468
TEST=Ran: FEATURES=test USE=asan emerge-$BOARD bluetooth

Change-Id: Ic4dc6fcecd2153ee568151aa21fc7f97268c6e06
Reviewed-on: https://chromium-review.googlesource.com/985094
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/ad3e546d63508584f47d3295f1ed0545840068f6/bluetooth/dispatcher/object_manager_interface_multiplexer_unittest.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Mar 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f1599cb66b77be2a74ec005fcb411d1c6ba113c4

commit f1599cb66b77be2a74ec005fcb411d1c6ba113c4
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Mar 29 06:31:47 2018

dbus: Make MockObjectManager useful

MockObjectManager is currently not useful as the mocked methods are not
virtual.

BUG=chromium:812468
TEST=None

Change-Id: I3fa533299cda839b4f3602de88f6e76dbac5b24c
Reviewed-on: https://chromium-review.googlesource.com/982942
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546746}
[modify] https://crrev.com/f1599cb66b77be2a74ec005fcb411d1c6ba113c4/dbus/object_manager.h

Project Member

Comment 24 by bugdroid1@chromium.org, Mar 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/72b97a0da7024af966ca0ccbdc31449c8c8c84e4

commit 72b97a0da7024af966ca0ccbdc31449c8c8c84e4
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 30 02:51:44 2018

bluetooth: Add utilities for D-Bus properties generalization.

A tool to work with type-generalization of D-Bus properties is needed,
so this CL adds the following classes:
* PropertySet: A subclass of dbus::PropertySet that can hold any number
  of properties of any types.
* PropertyFactory<T>: Creates dbus::Property<T> and
  brillo:dbus_utils::ExportedProperty<T>, and copies the value between
  them.

This CL is part of go/bluez-split-stack-phase-1 (Work 1).

BUG=chromium:812468
TEST=Unit test added

Change-Id: I08aa61644afffd792de10e1c1f4ec289b8b36596
Reviewed-on: https://chromium-review.googlesource.com/981685
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/72b97a0da7024af966ca0ccbdc31449c8c8c84e4/bluetooth/bluetooth.gyp
[modify] https://crrev.com/72b97a0da7024af966ca0ccbdc31449c8c8c84e4/bluetooth/dispatcher/object_manager_interface_multiplexer.cc
[add] https://crrev.com/72b97a0da7024af966ca0ccbdc31449c8c8c84e4/bluetooth/dispatcher/property.h
[add] https://crrev.com/72b97a0da7024af966ca0ccbdc31449c8c8c84e4/bluetooth/dispatcher/property_unittest.cc
[add] https://crrev.com/72b97a0da7024af966ca0ccbdc31449c8c8c84e4/bluetooth/dispatcher/property.cc

Project Member

Comment 25 by bugdroid1@chromium.org, Mar 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/58c51d5c0db3625785406e11e2066831fd4ebbfd

commit 58c51d5c0db3625785406e11e2066831fd4ebbfd
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 30 02:51:29 2018

bluetooth: Add newblued object manager service constants.

Newblue dispatcher service name is known as "org.chromium.Bluetooth",
and its root service path is the same as bluez ("/").

This CL is to be checked in after Chrome repo has dep-rolled CL
http://crosreview.com/959342 and migrated to kBluezObjectManager.

BUG=chromium:812468
TEST=None

Change-Id: Iea40432e1ecfe5e64046ae454b15c57a57dd8ab5
Reviewed-on: https://chromium-review.googlesource.com/959560
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/58c51d5c0db3625785406e11e2066831fd4ebbfd/dbus/service_constants.h

Project Member

Comment 26 by bugdroid1@chromium.org, Mar 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b300f2172842372d38cd443b18ceabc0883213bf

commit b300f2172842372d38cd443b18ceabc0883213bf
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Mar 30 21:02:18 2018

device/bluetooth: Update all references of kBluetoothServiceName.

kBluetoothServiceName shouldn't be used directly but enquired via
GetBluetoothServiceName() to get the correct Bluetooth service based on
feature.

BUG=chromium:812468
TEST=Tested on device

Change-Id: Ie3581ff686981050f033964e7985433ce3bd1046
Reviewed-on: https://chromium-review.googlesource.com/988252
Reviewed-by: Conley Owens <cco3@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547269}
[modify] https://crrev.com/b300f2172842372d38cd443b18ceabc0883213bf/device/bluetooth/dbus/bluez_dbus_manager.cc
[modify] https://crrev.com/b300f2172842372d38cd443b18ceabc0883213bf/device/bluetooth/dbus/bluez_dbus_manager.h

Project Member

Comment 27 by bugdroid1@chromium.org, Apr 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/00185751421132f8431aa380210503eac8fbd20c

commit 00185751421132f8431aa380210503eac8fbd20c
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Apr 03 23:12:44 2018

bluetooth: Add a wrapper of ExportedObjectManager

brillo::dbus_utils::ExportedObjectManager is too low-level for the
purposes of Bluetooth dispatcher. So this CL adds a wrapper for it that
provides a higher level API to conveniently manage the exported
objects/interfaces/properties.

This CL is part of go/bluez-split-stack-phase-1 (Work 1).

BUG=chromium:812468
TEST=Added unit test

Change-Id: Iede58a3ab99d5f04bae984f8b9163a4a38037a41
Reviewed-on: https://chromium-review.googlesource.com/981904
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/00185751421132f8431aa380210503eac8fbd20c/bluetooth/bluetooth.gyp
[add] https://crrev.com/00185751421132f8431aa380210503eac8fbd20c/bluetooth/dispatcher/exported_object_manager_wrapper.cc
[add] https://crrev.com/00185751421132f8431aa380210503eac8fbd20c/bluetooth/dispatcher/exported_object_manager_wrapper.h
[add] https://crrev.com/00185751421132f8431aa380210503eac8fbd20c/bluetooth/dispatcher/exported_object_manager_wrapper_unittest.cc

Project Member

Comment 28 by bugdroid1@chromium.org, Apr 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/f7801ece5ef35c515f078ef580b75e1cd7477b6a

commit f7801ece5ef35c515f078ef580b75e1cd7477b6a
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Apr 04 06:44:43 2018

bluetooth: Add handler to impersonate ObjectManager

This CL adds an ObjectManagerInterfaceMultiplexer that impersonates the
source ObjectManager that it consumes. At this moment this
ObjectManagerInterfaceMultiplexer doesn't actually do multiplexing as
only 1 source is supported.

Future work will allow multiple sources to
be impersonated and the multiplexer needs to resolve clashing
objects/interfaces/properties/methods.

This CL is part of go/bluez-split-stack-phase-1 (Work 1).

BUG=chromium:812468
TEST=Added unit test

Change-Id: Ib90cd47e9a2a75615ac7a9ff651106dcffd2057c
Reviewed-on: https://chromium-review.googlesource.com/982745
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/f7801ece5ef35c515f078ef580b75e1cd7477b6a/bluetooth/bluetooth.gyp
[add] https://crrev.com/f7801ece5ef35c515f078ef580b75e1cd7477b6a/bluetooth/dispatcher/impersonation_object_manager_interface.h
[add] https://crrev.com/f7801ece5ef35c515f078ef580b75e1cd7477b6a/bluetooth/dispatcher/impersonation_object_manager_interface_unittest.cc
[add] https://crrev.com/f7801ece5ef35c515f078ef580b75e1cd7477b6a/bluetooth/dispatcher/impersonation_object_manager_interface.cc

Project Member

Comment 29 by bugdroid1@chromium.org, Apr 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/7955bf614c52eaa3f53c548be1e625934165595d

commit 7955bf614c52eaa3f53c548be1e625934165595d
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Apr 04 19:05:50 2018

libchrome: Make MockObjectManager useful

MockObjectManager is currently not useful as the mocked methods are not
virtual.

This is a cherry-pick of CL:982942.

BUG=chromium:812468
TEST=None

Change-Id: I5731fcf49a839ecaae86b18547e8285d5fa11c0f
Reviewed-on: https://chromium-review.googlesource.com/986644
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/7955bf614c52eaa3f53c548be1e625934165595d/chromeos-base/libchrome/files/libchrome-395517-dbus-Make-MockObjectManager-useful.patch
[modify] https://crrev.com/7955bf614c52eaa3f53c548be1e625934165595d/chromeos-base/libchrome/libchrome-395517.ebuild
[rename] https://crrev.com/7955bf614c52eaa3f53c548be1e625934165595d/chromeos-base/libchrome/libchrome-395517-r27.ebuild

Project Member

Comment 30 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/183bb558c6103c96bdaff04228b16ac11a8f0540

commit 183bb558c6103c96bdaff04228b16ac11a8f0540
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Apr 06 05:12:26 2018

bluetooth: Add forwarding for Set property

This is to add a custom Properties.Set method handler so that any
Properties.Set requests are forwarded to the source service and the
response is forwarded back to the caller.

This CL is part of go/bluez-split-stack-phase-1 (Work 1).

CQ-DEPEND=CL:986644
BUG=chromium:812468
TEST=Added unit test

Change-Id: I8dc98f46ff325af01da51ff086fce241e7e35b22
Reviewed-on: https://chromium-review.googlesource.com/982746
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/183bb558c6103c96bdaff04228b16ac11a8f0540/bluetooth/dispatcher/impersonation_object_manager_interface.h
[modify] https://crrev.com/183bb558c6103c96bdaff04228b16ac11a8f0540/bluetooth/dispatcher/impersonation_object_manager_interface_unittest.cc
[modify] https://crrev.com/183bb558c6103c96bdaff04228b16ac11a8f0540/bluetooth/dispatcher/impersonation_object_manager_interface.cc

Project Member

Comment 31 by bugdroid1@chromium.org, Apr 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48

commit 842da743f7cb7b233320bc0d3bf64ed0a9ee1d48
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Apr 11 21:55:52 2018

bluetooth: Put together all pieces for dispatcher.

At this stage the dispatcher can actually impersonate BlueZ's
ObjectManager and expose the same exact objects to clients. It will also
preserve the behavior of Properties.Set by forwarding it to BlueZ.

This CL is part of go/bluez-split-stack-phase-1 (Work 1).

CQ-DEPEND=CL:959560

BUG=chromium:812468
TEST=Unit test and manual test on device

Change-Id: I27ee74ee20bea0f411ff7ccc5ce97620083c63ff
Reviewed-on: https://chromium-review.googlesource.com/987237
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/dispatcher/bluez_interface_handler.cc
[add] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/dispatcher/dispatcher.h
[add] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/dispatcher/dispatcher_unittest.cc
[modify] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/bluetooth.gyp
[add] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/dispatcher/dispatcher.cc
[modify] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/dispatcher/daemon.cc
[modify] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/dispatcher/daemon.h
[add] https://crrev.com/842da743f7cb7b233320bc0d3bf64ed0a9ee1d48/bluetooth/dispatcher/bluez_interface_handler.h

Project Member

Comment 32 by bugdroid1@chromium.org, Apr 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1e8ad444d7f4267c97a36bf4530e26a940b45f9d

commit 1e8ad444d7f4267c97a36bf4530e26a940b45f9d
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Apr 26 06:00:27 2018

libchrome: Don't DCHECK unexpected message type, but ignore it

In dbus::ExportedObject, an assumption was made that no signal could be
received for an exported object, so DCHECK was put there. Now that there
is a use case of D-Bus forwarding by Bluetooth dispatcher, it is fine
that an exported object receives D-Bus signal messages as it is a
property change signal that is handled by dbus::ObjectManager. So we can
just ignore message types other than method in dbus::ExportedObject
rather than DCHECK it.

This is a cherry-pick of CL:1027081.

BUG=chromium:812468, chromium:835457 
TEST=Build and platform2/bluetooth no longer crashes

Change-Id: I2dfc7c195bc5e72d2760e923d3f62174abc3fdfc
Reviewed-on: https://chromium-review.googlesource.com/1028712
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/1e8ad444d7f4267c97a36bf4530e26a940b45f9d/chromeos-base/libchrome/files/libchrome-395517-dbus-Don-t-DCHECK-unexpected-message-type-but-ignore.patch
[rename] https://crrev.com/1e8ad444d7f4267c97a36bf4530e26a940b45f9d/chromeos-base/libchrome/libchrome-395517-r29.ebuild
[modify] https://crrev.com/1e8ad444d7f4267c97a36bf4530e26a940b45f9d/chromeos-base/libchrome/libchrome-395517.ebuild

Project Member

Comment 33 by bugdroid1@chromium.org, Apr 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a

commit 4f287c4721b7a5fe47d140cd95282bd3ecedfd6a
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Apr 26 06:00:39 2018

bluetooth: Remove dbus::ObjectManager dependency

ObjectManagerInterfaceMultiplexer shouldn't directly depend on
dbus::ObjectManager. It should instead maintain a list of
dbus::ObjectManager and their service name. This architecture is more
suitable as in the future it will be able to impersonate ObjectManager
from multiple services.

Also added a small refactor of InterfaceHandler::GetPropertyFactoryMap
to return const reference instead of non-const pointer.

This CL is part of go/bluez-split-stack-phase-1 (Work 2).

BUG=chromium:812468
TEST=Unit test and manual test on device

Change-Id: I6b1569a4ae833b0f5706c2fdcb5c5d568245d24c
Reviewed-on: https://chromium-review.googlesource.com/999830
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a/bluetooth/dispatcher/impersonation_object_manager_interface.h
[modify] https://crrev.com/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a/bluetooth/dispatcher/impersonation_object_manager_interface_unittest.cc
[modify] https://crrev.com/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a/bluetooth/dispatcher/dispatcher.cc
[modify] https://crrev.com/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a/bluetooth/dispatcher/object_manager_interface_multiplexer.cc
[modify] https://crrev.com/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a/bluetooth/dispatcher/bluez_interface_handler.h
[modify] https://crrev.com/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a/bluetooth/dispatcher/object_manager_interface_multiplexer.h
[modify] https://crrev.com/4f287c4721b7a5fe47d140cd95282bd3ecedfd6a/bluetooth/dispatcher/impersonation_object_manager_interface.cc

Project Member

Comment 34 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/48dfdedf4222cc1d1d192fc985dca3fce4429252

commit 48dfdedf4222cc1d1d192fc985dca3fce4429252
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri May 11 02:40:46 2018

bluetooth: Add DispatcherClient for D-Bus client management.

Added DispatcherClient class to represent a client of the Bluetooth
dispatcher. This will be useful for managing D-Bus clients since each
client requires its own separate D-Bus connection for message
forwarding.

This CL is part of go/bluez-split-stack-phase-1 (Work 2).

BUG=chromium:812468
TEST=Unit test and manual test on device

Change-Id: I8ad6332b3c0b4955d5a1edda86adf507772e65a1
Reviewed-on: https://chromium-review.googlesource.com/1048028
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/dispatcher/dbus_connection_factory.h
[modify] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/bluetooth.gyp
[add] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/dispatcher/dispatcher_client.h
[add] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/dispatcher/dbus_connection_factory.cc
[add] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/dispatcher/mock_dbus_connection_factory.h
[add] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/dispatcher/more_mock_bus.h
[add] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/dispatcher/dispatcher_client.cc
[add] https://crrev.com/48dfdedf4222cc1d1d192fc985dca3fce4429252/bluetooth/dispatcher/dispatcher_client_unittest.cc

Project Member

Comment 35 by bugdroid1@chromium.org, May 11 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/52e823312a4dac8a9bc730a2328d428c31be0e99

commit 52e823312a4dac8a9bc730a2328d428c31be0e99
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri May 11 22:26:04 2018

bluetooth: Add method forwarding

Method forwarding is similar to Properties.Set forwarding. The only
difference is that it forwards the message using a separate D-Bus
connection specific to a client. Each client has its own forwarding
connection so that BlueZ can tell them apart.

This CL is part of go/bluez-split-stack-phase-1 (Work 2).

BUG=chromium:812468
TEST=Unit test and manual test on device

Change-Id: I270e898d45eeddda46efcf119f1ce1865ff21b56
Reviewed-on: https://chromium-review.googlesource.com/1045507
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/impersonation_object_manager_interface.h
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/bluez_interface_handler.cc
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/exported_object_manager_wrapper.h
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/dispatcher.h
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/impersonation_object_manager_interface_unittest.cc
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/exported_object_manager_wrapper.cc
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/dispatcher.cc
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/bluez_interface_handler.h
[modify] https://crrev.com/52e823312a4dac8a9bc730a2328d428c31be0e99/bluetooth/dispatcher/impersonation_object_manager_interface.cc

Summary: Implement pure bluez forwarder in btdispatch (was: Implement pure bluez forwarder in newblued)
Blockedon: 862849
Project Member

Comment 38 by bugdroid1@chromium.org, Sep 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/d7a8f123b2ecffb83daa50755364bd18d08d4281

commit d7a8f123b2ecffb83daa50755364bd18d08d4281
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Sat Sep 08 23:51:57 2018

libbrillo: Revert "libbrillo: Expose DBusObject of ExportedObjectManager."

The interface dbus_object() is no longer needed because after
https://crrev.com/c/1028712, libchrome correctly ignores uninteresting
messages rather than unnecessarily logging it as warning.

The last usage of this interface is removed in
https://crrev.com/c/1170382.

This reverts commit b599447f741b84592906791ca1230060069d0acd.

BUG=chromium:812468
TEST=Check that nobody uses it anymore
CQ-DEPEND=CL:1170382

Change-Id: I823bcedb08e19f785d2b8f9b0d1705d80f8e8c76
Reviewed-on: https://chromium-review.googlesource.com/1187338
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/d7a8f123b2ecffb83daa50755364bd18d08d4281/libbrillo/brillo/dbus/exported_object_manager.h

Project Member

Comment 39 by bugdroid1@chromium.org, Dec 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/94fe37c68cdeb1464feb0b8e557bc21d3d031bc1

commit 94fe37c68cdeb1464feb0b8e557bc21d3d031bc1
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Dec 18 08:42:54 2018

libbrillo: dbus: Provide DBusObject::UnexportInterfaceAsync()

In some cases, one may want to export an interface even after it's
removed. In that case, they should call
DBusObject::UnexportInterfaceAsync before removing the
interface to make sure it will start with a clean state of method
handlers.

This is currently needed by platform2/bluetooth for exporting and
unexporting the same interface of the same object dynamically for BlueZ
compatibility.

BUG=chromium:812468,chromium:883039
TEST=Added unit test and did manual integration test with
platform2/bluetooth
CQ-DEPEND=CL:1374549

Change-Id: Id5333acc5d5b79a6708accfb51c45c6d52cf9ae3
Reviewed-on: https://chromium-review.googlesource.com/1370854
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>

[modify] https://crrev.com/94fe37c68cdeb1464feb0b8e557bc21d3d031bc1/libbrillo/brillo/dbus/dbus_object.h
[modify] https://crrev.com/94fe37c68cdeb1464feb0b8e557bc21d3d031bc1/libbrillo/brillo/dbus/dbus_object_test.cc
[modify] https://crrev.com/94fe37c68cdeb1464feb0b8e557bc21d3d031bc1/libbrillo/brillo/dbus/dbus_object.cc

Project Member

Comment 40 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/a6917a161a04506b6778ae265ac6f4af8fc1b00b

commit a6917a161a04506b6778ae265ac6f4af8fc1b00b
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jan 08 09:59:06 2019

bluetooth: Unexport interface before remove interface

Calling UnexportInterfaceAsync ensures that the method handlers
registered with it are unregistered, so when this interface is
re-registered in the future it won't cause errors.

BUG=chromium:812468,chromium:883039
TEST=Manual test to trigger AgentManager interface removal:
  with bluetoothctl:
  power off
  power on
This triggers AgentManager object /org/bluez removal and re-export, this
operation shouldn't cause error/crash.

Change-Id: I10eba7d8841a89c2dc347f93905dc03b5aa4fd94
Reviewed-on: https://chromium-review.googlesource.com/1374534
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@google.com>

[modify] https://crrev.com/a6917a161a04506b6778ae265ac6f4af8fc1b00b/bluetooth/common/exported_object_manager_wrapper_unittest.cc
[modify] https://crrev.com/a6917a161a04506b6778ae265ac6f4af8fc1b00b/bluetooth/common/exported_object_manager_wrapper.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/875b781d644b67a22553810e4b7d197ad1639c84

commit 875b781d644b67a22553810e4b7d197ad1639c84
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jan 08 09:59:05 2019

bluetooth: Refactor ExportedInterface::Unexport and improve unit test

This refactoring helps in the next bug fix CL.

BUG=chromium:812468,chromium:883039
TEST=Unit tests don't regress, there should be no behavior change.

Change-Id: I4610b61c285070c741b3339c0a0eed072b88ce69
Reviewed-on: https://chromium-review.googlesource.com/1384643
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@google.com>

[modify] https://crrev.com/875b781d644b67a22553810e4b7d197ad1639c84/bluetooth/common/exported_object_manager_wrapper_unittest.cc
[modify] https://crrev.com/875b781d644b67a22553810e4b7d197ad1639c84/bluetooth/common/exported_object_manager_wrapper.cc

Sign in to add a comment