Rewrite apps::SavedDevicesService as extensions::DevicePermissionsManager.
commitbc82d3c46cedec68b175c9572a7de412eb0e6427
authorreillyg <reillyg@chromium.org>
Mon, 29 Sep 2014 19:27:54 +0000 (29 12:27 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 29 Sep 2014 19:28:09 +0000 (29 19:28 +0000)
tree5d012e638adbb770f9bc5eb4bf7a60ed88b8dc2f
parente01e6de4a23e8c9e53c497346d584e7f509e59f2
Rewrite apps::SavedDevicesService as extensions::DevicePermissionsManager.

This service doesn't need any Chrome dependencies after all and so it
can move into //extensions. This will make it possible for the USB
extensions API code to directly depend on it. In the process I have
rewritten the service with a couple improvements:

* C++11 for-each loops are used instead of explicit iterators.
* The DevicePermissions object is no longer an inner class (so it can
  be forward declared) and it is explicitly copied when requested so
  that the ownership of data on the FILE and UI threads is clear.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#297230}
17 files changed:
apps/BUILD.gn
apps/DEPS
apps/apps.gypi
apps/saved_devices_service.cc [deleted file]
apps/saved_devices_service.h [deleted file]
apps/saved_devices_service_factory.cc [deleted file]
apps/saved_devices_service_factory.h [deleted file]
chrome/browser/extensions/api/device_permissions_manager_unittest.cc [moved from apps/saved_devices_service_unittest.cc with 57% similarity]
chrome/chrome_tests_unit.gypi
extensions/browser/BUILD.gn
extensions/browser/DEPS
extensions/browser/api/device_permissions_manager.cc [new file with mode: 0644]
extensions/browser/api/device_permissions_manager.h [new file with mode: 0644]
extensions/browser/api/usb/DEPS
extensions/browser/api/usb_private/DEPS
extensions/extensions.gyp
extensions/extensions_strings.grd