Add a service to track devices selected by the user.
commit89b276fbcd87b3ce88be7b0a00df6d9266d90ad6
authorreillyg <reillyg@chromium.org>
Fri, 19 Sep 2014 15:00:01 +0000 (19 08:00 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Sep 2014 15:00:29 +0000 (19 15:00 +0000)
tree737ef60a3a1a6191f4a62e9a5c3a368bb6c668a8
parentbfae635632bc062c0a56f5ed525390c82ed5c6cc
Add a service to track devices selected by the user.

apps::SavedDevicesService tracks USB devices that have been selected by
the user in the context of a given extension. Devices that can be
identified accurately after they have been reconnected because they have
a serial number are written out to ExtensionPrefs. All others are only
remembered until they are disconnected.

A new OnDisconnect observer function has been added to UsbDevice to
enable this monitoring.

BUG=346953

Review URL: https://codereview.chromium.org/580963002

Cr-Commit-Position: refs/heads/master@{#295708}
15 files changed:
apps/BUILD.gn
apps/DEPS
apps/apps.gypi
apps/saved_devices_service.cc [new file with mode: 0644]
apps/saved_devices_service.h [new file with mode: 0644]
apps/saved_devices_service_factory.cc [new file with mode: 0644]
apps/saved_devices_service_factory.h [new file with mode: 0644]
apps/saved_devices_service_unittest.cc [new file with mode: 0644]
chrome/browser/devtools/device/usb/android_usb_browsertest.cc
chrome/chrome_tests_unit.gypi
device/usb/usb_device.h
device/usb/usb_device_handle.h
device/usb/usb_device_handle_impl.h
device/usb/usb_device_impl.cc
device/usb/usb_service_impl.cc