shill: Connection: Don't call Resolver::SetDNSFromIPConfig

Don't ever call this function (in fact, remove this from the
resolver), and refactor the code that correctly generates the
DNS search list so that it is usable both from
Connection::UpdateFromIPConfig() and from void
Connection::SetIsDefault().

BUG=chromium-os:34260
TEST=Rerun unit tests + Manual: Connect to AP that supplies only
"DomainName", and ensure that /etc/resolv.conf contains this domain
in the search field both initially and after DHCP renewal.

Change-Id: I9a0705cb54e6588915533cc343b05efcdee71293
Reviewed-on: https://gerrit.chromium.org/gerrit/32996
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/resolver.cc b/resolver.cc
index c9594f3..e10c587 100644
--- a/resolver.cc
+++ b/resolver.cc
@@ -38,22 +38,13 @@
   return g_resolver.Pointer();
 }
 
-bool Resolver::SetDNSFromIPConfig(const IPConfigRefPtr &ipconfig,
-                                  TimeoutParameters timeout) {
-  SLOG(Resolver, 2) << __func__;
-
-  CHECK(!path_.empty());
-
-  const IPConfig::Properties &props = ipconfig->properties();
-
-  return SetDNSFromLists(props.dns_servers, props.domain_search, timeout);
-}
-
 bool Resolver::SetDNSFromLists(const std::vector<std::string> &dns_servers,
                                const std::vector<std::string> &domain_search,
                                TimeoutParameters timeout) {
   SLOG(Resolver, 2) << __func__;
 
+  CHECK(!path_.empty());
+
   if (dns_servers.empty() && domain_search.empty()) {
     SLOG(Resolver, 2) << "DNS list is empty";
     return ClearDNS();