shill: Ignore certan DNS search paths

Add a manager property to provide a list of DNS Search paths
that should be ignored when applying DHCP parameters.  This
covers a list of DNS search suffixes that are popularly
provided, but are generally unlikely to provide any useful
results, therefore significantly reducing DNS lookup performance.

BUG=chromium-os:34495
TEST=Unit-tests + Manual: Add a domain to the default search list and make sure it is filtered from the "search" line in resolv.conf.
CQ-DEPENDS: I54bdd33a05bb704d8c3ff05f71e034fe42635e89

Change-Id: Id92b39f1ad0ae64b3ff50c7671cdf388d92a07af
Reviewed-on: https://gerrit.chromium.org/gerrit/33460
Reviewed-by: Christopher Wiley <wiley@chromium.org>
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.h b/resolver.h
index 2aeb4a7..6a2ccb1 100644
--- a/resolver.h
+++ b/resolver.h
@@ -25,6 +25,14 @@
     kShortTimeout
   };
 
+  // The default comma-separated list of search-list prefixes that
+  // should be ignored when writing out a DNS configuration.  These
+  // are usually preconfigured by a DHCP server and are not of real
+  // value to the user.  This will release DNS bandwidth for searches
+  // we expect will have a better chance of getting what the user is
+  // looking for.
+  static const char kDefaultIgnoredSearchList[];
+
   // The default comma-separated list of technologies for which short
   // DNS timeouts should be enabled.
   static const char kDefaultShortTimeoutTechnologies[];
@@ -46,6 +54,13 @@
   // Remove any created domain name service file.
   virtual bool ClearDNS();
 
+  // Sets the list of ignored DNS search suffixes.  This list will be used
+  // to filter the domain_search parameter of later SetDNSFromLists() calls.
+  virtual void set_ignored_search_list(
+      const std::vector<std::string> &ignored_list) {
+    ignored_search_list_ = ignored_list;
+  }
+
  protected:
   Resolver();
 
@@ -57,6 +72,7 @@
   static const char kShortTimeoutOptions[];
 
   FilePath path_;
+  std::vector<std::string> ignored_search_list_;
 
   DISALLOW_COPY_AND_ASSIGN(Resolver);
 };