bluetooth: fix issues with device removal
commit1d5661612464c78b104fe8271184684f7f76e864
authorkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 9 Mar 2012 05:20:12 +0000 (9 05:20 +0000)
committerkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 9 Mar 2012 05:20:12 +0000 (9 05:20 +0000)
tree5b7142eb2c3756e9d7c86d369ff16906e4814a2e
parent28745336713ec59c9d562c6a3e5ef13a595c12d5
bluetooth: fix issues with device removal

The DeviceRemoved signal comes with the object path, rather than the
address, but GetProperties can't be called to get the address because
the device has gone. Iterate the devices comparing object paths to
find the one we need; this is short and rare enough that a map would
be more wasteful.

Also the BrowserOptions.removeBluetoothDevice() function added in
I9624018 takes a string address rather than a device dictionary, so call
that correctly.

BUG=chromium-os:21320
TEST=verified on device after switching off mouse during discovery

Change-Id: Ie073282f92d3215a2e4a9a68b06d770ee65307cc

Review URL: http://codereview.chromium.org/9648010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125803 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/chromeos/bluetooth/bluetooth_adapter.cc
chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc