[PM] Add VoteObserver
This interface is basically a simpler VoteConsumer. It allows to observe votes made through a voting channel without having to deal with AcceptedVotes. One limitation it has is that it is no longer possible to submit multiple votes to the same context through a single VotingChannel. In practice, this was never done anyways. To support multiple votes for one context, it is easy to build multiple voting channels. Of course, AcceptedVotes still exists. Those are managed by the VoteConsumerDefaultImpl, which is a temporary class that handles creating and deleting AcceptedVotes as needed, then notifying the VoteObserver. The goal in the future is to fold this functionality into the VotingChannelFactory and remove VoteConsumer entirely. This will be done after each users of VoteConsumer are migrated one at a time. Bug: 971272 Change-Id: I4e890435cf29d4375ccb41b393b6d80b2d392778 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519207 Commit-Queue: Patrick Monette <pmonette@chromium.org> Reviewed-by:Chris Hamilton <chrisha@chromium.org> Cr-Commit-Position: refs/heads/master@{#825971}
Showing
Please register or sign in to comment