mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:17:34 +00:00
Browser+LibWeb: Move the cookie structure into LibWeb
This commit is contained in:
parent
c2d38abe6f
commit
7193e518d1
4 changed files with 52 additions and 16 deletions
|
@ -31,24 +31,11 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/Traits.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibWeb/Cookie/Cookie.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Browser {
|
||||
|
||||
struct Cookie {
|
||||
String name;
|
||||
String value;
|
||||
Core::DateTime creation_time {};
|
||||
Core::DateTime last_access_time {};
|
||||
Core::DateTime expiry_time {};
|
||||
String domain {};
|
||||
String path {};
|
||||
bool secure { false };
|
||||
bool http_only { false };
|
||||
bool host_only { false };
|
||||
bool persistent { false };
|
||||
};
|
||||
|
||||
struct CookieStorageKey {
|
||||
bool operator==(const CookieStorageKey&) const = default;
|
||||
|
||||
|
@ -71,7 +58,7 @@ private:
|
|||
void store_cookie(Web::Cookie::ParsedCookie& parsed_cookie, const URL& url, String canonicalized_domain);
|
||||
void purge_expired_cookies();
|
||||
|
||||
HashMap<CookieStorageKey, Cookie> m_cookies;
|
||||
HashMap<CookieStorageKey, Web::Cookie::Cookie> m_cookies;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue