mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add SameSite (same_site) and Priority attributes to CefCookie (fixes issue #2524)
This change also restores the Chromium default values for the SameSiteByDefaultCookies and CookiesWithoutSameSiteMustBeSecure features. See https://www.chromium.org/updates/same-site for feature details and rollout timeline.
This commit is contained in:
committed by
Marshall Greenblatt
parent
cbc0625272
commit
be6af15754
@@ -737,6 +737,25 @@ typedef struct _cef_urlparts_t {
|
||||
cef_string_t fragment;
|
||||
} cef_urlparts_t;
|
||||
|
||||
///
|
||||
// Cookie priority values.
|
||||
///
|
||||
typedef enum {
|
||||
CEF_COOKIE_PRIORITY_LOW = -1,
|
||||
CEF_COOKIE_PRIORITY_MEDIUM = 0,
|
||||
CEF_COOKIE_PRIORITY_HIGH = 1,
|
||||
} cef_cookie_priority_t;
|
||||
|
||||
///
|
||||
// Cookie same site values.
|
||||
///
|
||||
typedef enum {
|
||||
CEF_COOKIE_SAME_SITE_UNSPECIFIED,
|
||||
CEF_COOKIE_SAME_SITE_NO_RESTRICTION,
|
||||
CEF_COOKIE_SAME_SITE_LAX_MODE,
|
||||
CEF_COOKIE_SAME_SITE_STRICT_MODE,
|
||||
} cef_cookie_same_site_t;
|
||||
|
||||
///
|
||||
// Cookie information.
|
||||
///
|
||||
@@ -791,6 +810,16 @@ typedef struct _cef_cookie_t {
|
||||
///
|
||||
int has_expires;
|
||||
cef_time_t expires;
|
||||
|
||||
///
|
||||
// Same site.
|
||||
///
|
||||
cef_cookie_same_site_t same_site;
|
||||
|
||||
///
|
||||
// Priority.
|
||||
///
|
||||
cef_cookie_priority_t priority;
|
||||
} cef_cookie_t;
|
||||
|
||||
///
|
||||
|
@@ -851,6 +851,8 @@ struct CefCookieTraits {
|
||||
target->last_access = src->last_access;
|
||||
target->has_expires = src->has_expires;
|
||||
target->expires = src->expires;
|
||||
target->same_site = src->same_site;
|
||||
target->priority = src->priority;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user