Add a new CefURLParts.origin member for retrieving the origin when parsing a URL.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1578 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-01-28 19:19:41 +00:00
parent 2f8b024797
commit b608dae758
4 changed files with 210 additions and 165 deletions

View File

@@ -595,6 +595,14 @@ typedef struct _cef_urlparts_t {
///
cef_string_t port;
///
// Origin contains just the scheme, host, and port from a URL. Equivalent to
// clearing any username and password, replacing the path with a slash, and
// clearing everything after that. This value will be empty for non-standard
// URLs.
///
cef_string_t origin;
///
// Path component including the first slash following the host.
///

View File

@@ -472,6 +472,7 @@ struct CefURLPartsTraits {
cef_string_clear(&s->password);
cef_string_clear(&s->host);
cef_string_clear(&s->port);
cef_string_clear(&s->origin);
cef_string_clear(&s->path);
cef_string_clear(&s->query);
}
@@ -486,6 +487,7 @@ struct CefURLPartsTraits {
copy);
cef_string_set(src->host.str, src->host.length, &target->host, copy);
cef_string_set(src->port.str, src->port.length, &target->port, copy);
cef_string_set(src->origin.str, src->origin.length, &target->origin, copy);
cef_string_set(src->path.str, src->path.length, &target->path, copy);
cef_string_set(src->query.str, src->query.length, &target->query, copy);
}