LibWeb: Extract out the User-Agent browser name and version

This way we can re-use these elsewhere, and if they ever change again,
those other uses will get updated automatically.
This commit is contained in:
Timothy Flynn 2022-11-18 08:47:34 -05:00 committed by Linus Groh
commit 021eb04640
Notes: sideshowbarker 2024-07-17 04:23:01 +09:00

View file

@ -44,7 +44,10 @@ namespace Web {
# error Unknown OS
#endif
constexpr auto default_user_agent = "Mozilla/5.0 (" OS_STRING "; " CPU_STRING ") LibWeb+LibJS/1.0 Ladybird/1.0"sv;
#define BROWSER_NAME "Ladybird"
#define BROWSER_VERSION "1.0"
constexpr auto default_user_agent = "Mozilla/5.0 (" OS_STRING "; " CPU_STRING ") LibWeb+LibJS/1.0 " BROWSER_NAME "/" BROWSER_VERSION ""sv;
class ResourceLoaderConnectorRequest : public RefCounted<ResourceLoaderConnectorRequest> {
public: