[iOS] Make CBD Manager Subscribe to Time Range changes
Currently, we set, but don't subscribe to changes of, Time Range in the new CBD dialog. For this to work, it is implicitly assumed that Time Range can only be changed through CBD. Bug 961340 reveals a glitch that Time Range can actually be changed by other entities. With this the least we can do is to have a more defensive design and subscribe to changes on Time Range, so we can keep the consistency between the interface and the browser state. - CBDManager is chosen to be the Time Range observing entity, as it is the creator of the Time Range item. - Remove the definition (and use) of TimeRangeSelectorTableViewControllerDelegate, which is no longer needed since the observer is by itself actively observing changes on Time Range. - Update unit tests. Bug: 961340 Change-Id: I2f692f770c8b533c1bf3730ba34c08fe2bc49269 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1602648Reviewed-by:Gauthier Ambard <gambard@chromium.org> Commit-Queue: Huanzhong Huang <huanzhong@chromium.org> Cr-Commit-Position: refs/heads/master@{#660330}
Showing
Please register or sign in to comment