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

Side by Side Diff: url/gurl.h

Issue 2584513003: PlzNavigate: identify same-page browser-initiated navigation. (Closed)
Patch Set: Rebase. Created 3 years, 10 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
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_GURL_H_ 5 #ifndef URL_GURL_H_
6 #define URL_GURL_H_ 6 #define URL_GURL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <iosfwd> 10 #include <iosfwd>
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // the given input string. For example, if the hostname of the URL is 378 // the given input string. For example, if the hostname of the URL is
379 // "www.google.com", this will return true for "com", "google.com", and 379 // "www.google.com", this will return true for "com", "google.com", and
380 // "www.google.com". 380 // "www.google.com".
381 // 381 //
382 // The input domain should be lower-case ASCII to match the canonicalized 382 // The input domain should be lower-case ASCII to match the canonicalized
383 // scheme. This call is more efficient than getting the host and check 383 // scheme. This call is more efficient than getting the host and check
384 // whether host has the specific domain or not because no copies or 384 // whether host has the specific domain or not because no copies or
385 // object constructions are done. 385 // object constructions are done.
386 bool DomainIs(base::StringPiece lower_ascii_domain) const; 386 bool DomainIs(base::StringPiece lower_ascii_domain) const;
387 387
388 // Checks whether or not two URLs are differing only in the ref (the part
389 // after the # character).
390 static bool EqualsIgnoringRef(const GURL& x, const GURL& y);
brettw 2017/02/07 06:37:47 I think I would prefer a non-static function: bo
arthursonzogni 2017/02/07 12:04:50 Done.
391
388 // Swaps the contents of this GURL object with |other|, without doing 392 // Swaps the contents of this GURL object with |other|, without doing
389 // any memory allocations. 393 // any memory allocations.
390 void Swap(GURL* other); 394 void Swap(GURL* other);
391 395
392 // Returns a reference to a singleton empty GURL. This object is for callers 396 // Returns a reference to a singleton empty GURL. This object is for callers
393 // who return references but don't have anything to return in some cases. 397 // who return references but don't have anything to return in some cases.
394 // If you just want an empty URL for normal use, prefer GURL(). This function 398 // If you just want an empty URL for normal use, prefer GURL(). This function
395 // may be called from any thread. 399 // may be called from any thread.
396 static const GURL& EmptyGURL(); 400 static const GURL& EmptyGURL();
397 401
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 URL_EXPORT bool operator==(const GURL& x, const GURL& y); 457 URL_EXPORT bool operator==(const GURL& x, const GURL& y);
454 URL_EXPORT bool operator!=(const GURL& x, const GURL& y); 458 URL_EXPORT bool operator!=(const GURL& x, const GURL& y);
455 459
456 // Equality operator for comparing raw spec_. This should be used in place of 460 // Equality operator for comparing raw spec_. This should be used in place of
457 // url == GURL(spec) where |spec| is known (i.e. constants). This is to prevent 461 // url == GURL(spec) where |spec| is known (i.e. constants). This is to prevent
458 // needlessly re-parsing |spec| into a temporary GURL. 462 // needlessly re-parsing |spec| into a temporary GURL.
459 URL_EXPORT bool operator==(const GURL& x, const base::StringPiece& spec); 463 URL_EXPORT bool operator==(const GURL& x, const base::StringPiece& spec);
460 URL_EXPORT bool operator!=(const GURL& x, const base::StringPiece& spec); 464 URL_EXPORT bool operator!=(const GURL& x, const base::StringPiece& spec);
461 465
462 #endif // URL_GURL_H_ 466 #endif // URL_GURL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698