Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: net/base/url_util.h

Issue 1876683002: Implement SDCH Dictionary domain matching as per RFC 2965 Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Factor out IsDomainMatch from CanonicalCookie and use it in SdchDictionary. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/sdch_dictionary.cc ('k') | net/base/url_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains a set of utility functions related to parsing, 5 // This file contains a set of utility functions related to parsing,
6 // manipulating, and interacting with URLs and hostnames. These functions are 6 // manipulating, and interacting with URLs and hostnames. These functions are
7 // intended to be of a text-processing nature, and should not attempt to use any 7 // intended to be of a text-processing nature, and should not attempt to use any
8 // networking or blocking services. 8 // networking or blocking services.
9 9
10 #ifndef NET_BASE_URL_UTIL_H_ 10 #ifndef NET_BASE_URL_UTIL_H_
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // for histograms and shouldn't be used to affect behavior. 165 // for histograms and shouldn't be used to affect behavior.
166 NET_EXPORT_PRIVATE bool HasGoogleHost(const GURL& url); 166 NET_EXPORT_PRIVATE bool HasGoogleHost(const GURL& url);
167 167
168 // This function tests |host| to see if it is of any local hostname form. 168 // This function tests |host| to see if it is of any local hostname form.
169 // |host| is normalized before being tested and if |is_local6| is not NULL then 169 // |host| is normalized before being tested and if |is_local6| is not NULL then
170 // it it will be set to true if the localhost name implies an IPv6 interface ( 170 // it it will be set to true if the localhost name implies an IPv6 interface (
171 // for instance localhost6.localdomain6). 171 // for instance localhost6.localdomain6).
172 NET_EXPORT_PRIVATE bool IsLocalHostname(base::StringPiece host, 172 NET_EXPORT_PRIVATE bool IsLocalHostname(base::StringPiece host,
173 bool* is_local6); 173 bool* is_local6);
174 174
175 // Returns true if the |domain| matches the given |host| as described in
176 // section 5.1.3 of RFC 6265.
177 NET_EXPORT_PRIVATE bool IsDomainMatch(const std::string& domain,
178 const std::string& host);
179
175 } // namespace net 180 } // namespace net
176 181
177 #endif // NET_BASE_URL_UTIL_H_ 182 #endif // NET_BASE_URL_UTIL_H_
OLDNEW
« no previous file with comments | « net/base/sdch_dictionary.cc ('k') | net/base/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698