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

Unified Diff: url/scheme_host_port.h

Issue 2391383003: Add Origin::CreateFromNormalizedTuple and call from WebSecurityOrigin (Closed)
Patch Set: git cl format Created 4 years, 2 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
« no previous file with comments | « url/origin.cc ('k') | url/scheme_host_port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/scheme_host_port.h
diff --git a/url/scheme_host_port.h b/url/scheme_host_port.h
index dc8862aab6f776b60beaec21d185b690a8f03f2f..065e4aa6059c2e3f887d0518071ad9ac74b8b2cf 100644
--- a/url/scheme_host_port.h
+++ b/url/scheme_host_port.h
@@ -88,6 +88,19 @@ class URL_EXPORT SchemeHostPort {
base::StringPiece host,
uint16_t port);
+ // Metadata influencing whether or not the constructor should sanity check
+ // host canonicalization.
+ enum ConstructPolicy { CHECK_CANONICALIZATION, ALREADY_CANONICALIZED };
+
+ // Creates a (scheme, host, port) tuple without performing sanity checking
+ // that the host and port are canonicalized. This should only be used when
+ // converting between already normalized types, and should NOT be used for
+ // IPC.
+ SchemeHostPort(base::StringPiece scheme,
+ base::StringPiece host,
+ uint16_t port,
+ ConstructPolicy policy);
+
// Creates a (scheme, host, port) tuple from |url|, as described at
// https://tools.ietf.org/html/rfc6454#section-4
//
« no previous file with comments | « url/origin.cc ('k') | url/scheme_host_port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698