Create a notifier class for system DNS config changes
Essentially a thread-safe notifier wrapping around DnsConfigService, intended (but not yet used) for NetworkChangeNotifier and HostResolverManager(s) to listen to a shared object for system DNS config changes. In subsequent CLs, this will allow us to divorce HostResolverManager from listening to NetworkChangeNotifier and be able to apply Chrome-internal config changes on top of the system-only changes currently triggerring change notifications. In non-test, will generally be expected to be broadly shared and leaked on shutdown. Sequence-safe destruction is still implemented (using an internal Core class with an OnTaskRunnerDeleter) for any special cases and for tests. Note that some of the internal workings of the new class work similarly to base::ObserverListThreadSafe, but it was too difficult to make that work with the requirement that we always be able to get an initial config once ready, whether read before or after adding observers. Bug: 971411 Change-Id: Iac79dba9f74018ae6b9559c27df60174bf4edc93 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1654881Reviewed-by:Matt Menke <mmenke@chromium.org> Commit-Queue: Eric Orth <ericorth@chromium.org> Cr-Commit-Position: refs/heads/master@{#672087}
Showing
This diff is collapsed.
Please register or sign in to comment