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

Side by Side Diff: url/gurl.h

Issue 2769283002: Enable noexcept on Windows, use for a few move constructors. (Closed)
Patch Set: Landmine Created 3 years, 9 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 | « tools/gn/value.cc ('k') | url/gurl.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_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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 string. It does not re-parse.
56 GURL(const GURL& other); 56 GURL(const GURL& other);
57 GURL(GURL&& other); 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.
66 GURL(const char* canonical_spec, 66 GURL(const char* canonical_spec,
67 size_t canonical_spec_len, 67 size_t canonical_spec_len,
(...skipping 399 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
« no previous file with comments | « tools/gn/value.cc ('k') | url/gurl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698