Allow Chromium's DBus service ownership to be stealable

We've seen some cases in tests where a Chromium process winds up in a
temporarily unkillable state, causing the dbus-daemon to believe that
it still actively owns org.chromium.LibCrosService.  This makes
attempts to restart the UI fail, as the browser dies when it cannot
take ownership of this service name. The reason it can't is because
Chromium currently doesn't allow other processes to steal ownership --
and the unkillable process is holding onto the token.

This can be remedied by providing certain options when ownership of
the service name is taken, options that allow other processes to seize
ownership if they so choose. The ramifications of this are discussed
further in the bug.

BUG=chromium:261381
TEST=new unit test in dbus_unittest
TEST=run the following as chronos on a device: "gdbus call --system --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.RequestName org.chromium.LibCrosService 7"
TEST=This should return (uint32 1,)

Review URL: https://chromiumcodereview.appspot.com/20555003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214589 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: e282490e359a536c91b15c9a9023cc798fab303b
5 files changed
tree: 15d281e7ba07519cac687df4695a2ab9c236bc04
  1. base/
  2. build/
  3. dbus/
  4. ipc/
  5. testing/
  6. third_party/