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

Side by Side Diff: url/url_util.h

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Move IsFragmentAddedOrUpdated from net/ to url∕ Created 3 years, 11 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 | « third_party/WebKit/public/platform/WebURLRequest.h ('k') | url/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 #ifndef URL_URL_UTIL_H_ 5 #ifndef URL_URL_UTIL_H_
6 #define URL_URL_UTIL_H_ 6 #define URL_URL_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // If either of the input StringPieces is empty, the return value is false. The 169 // If either of the input StringPieces is empty, the return value is false. The
170 // input domain should be a lower-case ASCII string in order to match the 170 // input domain should be a lower-case ASCII string in order to match the
171 // canonicalized host. 171 // canonicalized host.
172 URL_EXPORT bool DomainIs(base::StringPiece canonicalized_host, 172 URL_EXPORT bool DomainIs(base::StringPiece canonicalized_host,
173 base::StringPiece lower_ascii_domain); 173 base::StringPiece lower_ascii_domain);
174 174
175 // Returns true if the hostname is an IP address. Note: this function isn't very 175 // Returns true if the hostname is an IP address. Note: this function isn't very
176 // cheap, as it must re-parse the host to verify. 176 // cheap, as it must re-parse the host to verify.
177 URL_EXPORT bool HostIsIPAddress(base::StringPiece host); 177 URL_EXPORT bool HostIsIPAddress(base::StringPiece host);
178 178
179 // Fragment --------------------------------------------------------------------
180
181 // Checks whether or not two URLs are differing only in the fragment (the part
182 // after the # character). Returns false when the new URL has no fragment.
183 URL_EXPORT bool IsFragmentAddedOrUpdated(const GURL& old_url,
brettw 2017/01/26 20:44:46 Several points: Regarding the naming: This code u
184 const GURL& new_url);
185
179 // URL library wrappers -------------------------------------------------------- 186 // URL library wrappers --------------------------------------------------------
180 187
181 // Parses the given spec according to the extracted scheme type. Normal users 188 // Parses the given spec according to the extracted scheme type. Normal users
182 // should use the URL object, although this may be useful if performance is 189 // should use the URL object, although this may be useful if performance is
183 // critical and you don't want to do the heap allocation for the std::string. 190 // critical and you don't want to do the heap allocation for the std::string.
184 // 191 //
185 // As with the Canonicalize* functions, the charset converter can 192 // As with the Canonicalize* functions, the charset converter can
186 // be NULL to use UTF-8 (it will be faster in this case). 193 // be NULL to use UTF-8 (it will be faster in this case).
187 // 194 //
188 // Returns true if a valid URL was produced, false if not. On failure, the 195 // Returns true if a valid URL was produced, false if not. On failure, the
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 264
258 // Escapes the given string as defined by the JS method encodeURIComponent. See 265 // Escapes the given string as defined by the JS method encodeURIComponent. See
259 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeUR IComponent 266 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeUR IComponent
260 URL_EXPORT void EncodeURIComponent(const char* input, 267 URL_EXPORT void EncodeURIComponent(const char* input,
261 int length, 268 int length,
262 CanonOutput* output); 269 CanonOutput* output);
263 270
264 } // namespace url 271 } // namespace url
265 272
266 #endif // URL_URL_UTIL_H_ 273 #endif // URL_URL_UTIL_H_
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebURLRequest.h ('k') | url/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698