Apply Occam's razor to U2fDiscovery.
No production code is calling U2fDiscovery::Stop, and all observer method implementations are no-ops. Similarly, no U2fDiscovery has more than a single observer added, and the only time that observer is removed is when both the discovery and that observer (the owner) dies. It sounds like we are not going to make use of this functionality in the near future, so this CL removes: -- the ability to Stop() U2fDiscoveries, and -- the ability to have more than a single Observer per U2fDiscovery. The CL also moves slightly more functionality into the U2fDiscovery base class from derived classes, most importantly with the goal of making sure the fake and production implementations function consistently in the following areas: -- U2fDiscovery now keeps track of whether Start NotifyDiscoveryStarted have been called, and exposes corresponding getters. -- It is now enforced that Start() and NotifyDiscoveryStarted() can be called once each, and in this order, as well as that NotifyDeviceAdded cannot be called before Start() is called. -- It is now enforced that Observer::DiscoveryStarted is never invoked synchronously while Start() is still on the call stack. Bug: 822244, 823686 Change-Id: Ia029646d43481a1a2ca58452577727f96d6aade1 Reviewed-on: https://chromium-review.googlesource.com/964301 Commit-Queue: Balazs Engedy <engedy@chromium.org> Reviewed-by:Jan Wilken Dörrie <jdoerrie@chromium.org> Cr-Commit-Position: refs/heads/master@{#544379}
Showing
Please register or sign in to comment