mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@@ -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.
|
||||
///
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user