OLD | NEW |
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 <iosfwd> | 8 #include <iosfwd> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "url/url_canon.h" | 13 #include "url/url_canon.h" |
14 #include "url/url_canon_stdstring.h" | 14 #include "url/url_canon_stdstring.h" |
15 #include "url/url_constants.h" | 15 #include "url/url_constants.h" |
16 #include "url/url_export.h" | 16 #include "url/url_export.h" |
17 #include "url/url_parse.h" | 17 #include "url/url_parse.h" |
18 | 18 |
19 class URL_EXPORT GURL { | 19 class URL_EXPORT GURL { |
20 public: | 20 public: |
21 typedef url::StdStringReplacements<std::string> Replacements; | 21 typedef url::StringPieceReplacements<std::string> Replacements; |
22 typedef url::StdStringReplacements<base::string16> ReplacementsW; | 22 typedef url::StringPieceReplacements<base::string16> ReplacementsW; |
23 | 23 |
24 // Creates an empty, invalid URL. | 24 // Creates an empty, invalid URL. |
25 GURL(); | 25 GURL(); |
26 | 26 |
27 // Copy construction is relatively inexpensive, with most of the time going | 27 // Copy construction is relatively inexpensive, with most of the time going |
28 // to reallocating the string. It does not re-parse. | 28 // to reallocating the string. It does not re-parse. |
29 GURL(const GURL& other); | 29 GURL(const GURL& other); |
30 | 30 |
31 // The narrow version requires the input be UTF-8. Invalid UTF-8 input will | 31 // The narrow version requires the input be UTF-8. Invalid UTF-8 input will |
32 // result in an invalid URL. | 32 // result in an invalid URL. |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 // Used for nested schemes [currently only filesystem:]. | 396 // Used for nested schemes [currently only filesystem:]. |
397 scoped_ptr<GURL> inner_url_; | 397 scoped_ptr<GURL> inner_url_; |
398 | 398 |
399 // TODO bug 684583: Add encoding for query params. | 399 // TODO bug 684583: Add encoding for query params. |
400 }; | 400 }; |
401 | 401 |
402 // Stream operator so GURL can be used in assertion statements. | 402 // Stream operator so GURL can be used in assertion statements. |
403 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); | 403 URL_EXPORT std::ostream& operator<<(std::ostream& out, const GURL& url); |
404 | 404 |
405 #endif // URL_GURL_H_ | 405 #endif // URL_GURL_H_ |
OLD | NEW |