Index: url/scheme_host_port.h |
diff --git a/url/scheme_host_port.h b/url/scheme_host_port.h |
index 47a9041e2afd8e1db1b92654b0d72cfddef9bdd4..dc8862aab6f776b60beaec21d185b690a8f03f2f 100644 |
--- a/url/scheme_host_port.h |
+++ b/url/scheme_host_port.h |
@@ -16,6 +16,8 @@ class GURL; |
namespace url { |
+struct Parsed; |
+ |
// This class represents a (scheme, host, port) tuple extracted from a URL. |
// |
// The primary purpose of this class is to represent relevant network-authority |
@@ -111,6 +113,10 @@ class URL_EXPORT SchemeHostPort { |
// serialized as a unique Origin. |
std::string Serialize() const; |
+ // Efficiently returns what GURL(Serialize()) would return, without needing to |
+ // re-parse the URL. |
+ GURL GetURL() const; |
+ |
// Two SchemeHostPort objects are "equal" iff their schemes, hosts, and ports |
// are exact matches. |
// |
@@ -124,6 +130,8 @@ class URL_EXPORT SchemeHostPort { |
bool operator<(const SchemeHostPort& other) const; |
private: |
+ std::string SerializeInternal(url::Parsed* parsed) const; |
+ |
std::string scheme_; |
std::string host_; |
uint16_t port_; |