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

Unified Diff: url/scheme_host_port.h

Issue 2378323003: Add url::Origin::GetURL() to convert Origins to URLs without reparsing (Closed)
Patch Set: s/GURL("null")/GURL() Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: url/scheme_host_port.h
diff --git a/url/scheme_host_port.h b/url/scheme_host_port.h
index 47a9041e2afd8e1db1b92654b0d72cfddef9bdd4..58d0212e2d18b3583a00b18ef99a5c9a59d28348 100644
--- a/url/scheme_host_port.h
+++ b/url/scheme_host_port.h
@@ -111,6 +111,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.
//

Powered by Google App Engine
This is Rietveld 408576698