dns: Explicitly use std::initializer_list with base::NoDestructor

This fixes the GCC build after 65be571f ("Add DNS histograms for private DNS
usage, perf, and auto-upgradability").

Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, having
base::NoDestructor<T<U>> and passing an initializer list of Us does not
work if this is not done explicitly, as GCC incorrectly fails to determine
which constructor overload to use:

    ../../net/dns/host_resolver_impl.cc: In function ‘bool net::{anonymous}::DnsServerSupportsDoh(const net::IPAddress&)’:
    ../../net/dns/host_resolver_impl.cc:525:8: error: call of overloaded ‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous
           });
            ^
    In file included from ../../net/dns/host_resolver_impl.cc:42:
    ../../base/no_destructor.h:62:3: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const base::NoDestructor<T>&) [with T = std::unordered_set<std::__cxx11::basic_string<char> >]’ <deleted>
       NoDestructor(const NoDestructor&) = delete;
       ^~~~~~~~~~~~
    ../../base/no_destructor.h:60:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(T&&) [with T = std::unordered_set<std::__cxx11::basic_string<char> >]’
       explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); }
                ^~~~~~~~~~~~
    ../../base/no_destructor.h:59:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const T&) [with T = std::unordered_set<std::__cxx11::basic_string<char> >]’
       explicit NoDestructor(const T& x) { new (storage_) T(x); }
                ^~~~~~~~~~~~

See also: https://chromium-review.googlesource.com/c/chromium/src/+/1170905

Bug: 819294
Change-Id: I821c5215bf39c9c3caf50c614710dba551b0a19a
Reviewed-on: https://chromium-review.googlesource.com/c/1352353
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#611593}
1 file changed