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

Side by Side Diff: url/gurl.h

Issue 2798953002: [PageLoadMetrics] Keep track of Ad Sizes on Pages (Closed)
Patch Set: Address comments from PS8 Created 3 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
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // will know to escape this and produce the desired result. 45 // will know to escape this and produce the desired result.
46 class URL_EXPORT GURL { 46 class URL_EXPORT GURL {
47 public: 47 public:
48 typedef url::StringPieceReplacements<std::string> Replacements; 48 typedef url::StringPieceReplacements<std::string> Replacements;
49 typedef url::StringPieceReplacements<base::string16> ReplacementsW; 49 typedef url::StringPieceReplacements<base::string16> ReplacementsW;
50 50
51 // Creates an empty, invalid URL. 51 // Creates an empty, invalid URL.
52 GURL(); 52 GURL();
53 53
54 // Copy construction is relatively inexpensive, with most of the time going 54 // Copy construction is relatively inexpensive, with most of the time going
55 // to reallocating the string. It does not re-parse. 55 // to reallocating the srtcing. It does not re-parse.
Charlie Harrison 2017/04/11 17:30:07 nit: typo
jkarlin 2017/04/13 17:25:30 Done.
56 GURL(const GURL& other); 56 GURL(const GURL& other);
57 GURL(GURL&& other) noexcept; 57 GURL(GURL&& other) noexcept;
58 58
59 // The strings to this contructor should be UTF-8 / UTF-16. 59 // The strings to this contructor should be UTF-8 / UTF-16.
60 explicit GURL(base::StringPiece url_string); 60 explicit GURL(base::StringPiece url_string);
61 explicit GURL(base::StringPiece16 url_string); 61 explicit GURL(base::StringPiece16 url_string);
62 62
63 // Constructor for URLs that have already been parsed and canonicalized. This 63 // Constructor for URLs that have already been parsed and canonicalized. This
64 // is used for conversions from KURL, for example. The caller must supply all 64 // is used for conversions from KURL, for example. The caller must supply all
65 // information associated with the URL, which must be correct and consistent. 65 // information associated with the URL, which must be correct and consistent.
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 URL_EXPORT bool operator==(const GURL& x, const GURL& y); 467 URL_EXPORT bool operator==(const GURL& x, const GURL& y);
468 URL_EXPORT bool operator!=(const GURL& x, const GURL& y); 468 URL_EXPORT bool operator!=(const GURL& x, const GURL& y);
469 469
470 // Equality operator for comparing raw spec_. This should be used in place of 470 // Equality operator for comparing raw spec_. This should be used in place of
471 // url == GURL(spec) where |spec| is known (i.e. constants). This is to prevent 471 // url == GURL(spec) where |spec| is known (i.e. constants). This is to prevent
472 // needlessly re-parsing |spec| into a temporary GURL. 472 // needlessly re-parsing |spec| into a temporary GURL.
473 URL_EXPORT bool operator==(const GURL& x, const base::StringPiece& spec); 473 URL_EXPORT bool operator==(const GURL& x, const base::StringPiece& spec);
474 URL_EXPORT bool operator!=(const GURL& x, const base::StringPiece& spec); 474 URL_EXPORT bool operator!=(const GURL& x, const base::StringPiece& spec);
475 475
476 #endif // URL_GURL_H_ 476 #endif // URL_GURL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698