| Index: net/base/sdch_dictionary.cc | 
| diff --git a/net/base/sdch_dictionary.cc b/net/base/sdch_dictionary.cc | 
| index b8faf552390601da1e31dfe13d229ab60cded96e..1842c451f9eb9051b644e6db7475cda0e70e9d14 100644 | 
| --- a/net/base/sdch_dictionary.cc | 
| +++ b/net/base/sdch_dictionary.cc | 
| @@ -4,19 +4,12 @@ | 
|  | 
| #include "net/base/sdch_dictionary.h" | 
|  | 
| +#include "base/strings/string_util.h" | 
| #include "base/time/clock.h" | 
| #include "base/time/default_clock.h" | 
| #include "base/values.h" | 
| #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 
| - | 
| -namespace { | 
| - | 
| -bool DomainMatch(const GURL& gurl, const std::string& restriction) { | 
| -  // TODO(jar): This is not precisely a domain match definition. | 
| -  return gurl.DomainIs(restriction); | 
| -} | 
| - | 
| -}  // namespace | 
| +#include "net/base/url_util.h" | 
|  | 
| namespace net { | 
|  | 
| @@ -87,7 +80,7 @@ SdchProblemCode SdchDictionary::CanSet(const std::string& domain, | 
| return SDCH_DICTIONARY_SPECIFIES_TOP_LEVEL_DOMAIN;  // domain was a TLD. | 
| } | 
|  | 
| -  if (!DomainMatch(dictionary_url, domain)) | 
| +  if (!IsDomainMatch(domain, dictionary_url.host())) | 
| return SDCH_DICTIONARY_DOMAIN_NOT_MATCHING_SOURCE_URL; | 
|  | 
| std::string referrer_url_host = dictionary_url.host(); | 
| @@ -119,7 +112,7 @@ SdchProblemCode SdchDictionary::CanUse(const GURL& target_url) const { | 
| *    HTTPS support AND the dictionary acquisition scheme matches the target | 
| *   url scheme. | 
| */ | 
| -  if (!DomainMatch(target_url, domain_)) | 
| +  if (!IsDomainMatch(domain_, target_url.host())) | 
| return SDCH_DICTIONARY_FOUND_HAS_WRONG_DOMAIN; | 
|  | 
| if (!ports_.empty() && 0 == ports_.count(target_url.EffectiveIntPort())) | 
|  |