mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 756384 - Maemo/Meego builds should have the "Mobile" token in the UA string. r=mfinkle
This commit is contained in:
parent
bcb461bbc5
commit
5afbe4e354
@ -654,7 +654,7 @@ nsHttpHandler::BuildUserAgent()
|
||||
mUserAgent += mPlatform;
|
||||
mUserAgent.AppendLiteral("; ");
|
||||
#endif
|
||||
#ifdef ANDROID
|
||||
#if defined(ANDROID) || defined(MOZ_PLATFORM_MAEMO)
|
||||
if (!mCompatDevice.IsEmpty()) {
|
||||
mUserAgent += mCompatDevice;
|
||||
mUserAgent.AppendLiteral("; ");
|
||||
@ -712,7 +712,7 @@ nsHttpHandler::InitUserAgentComponents()
|
||||
#endif
|
||||
);
|
||||
|
||||
#if defined(ANDROID)
|
||||
#if defined(ANDROID) || defined(MOZ_PLATFORM_MAEMO)
|
||||
nsCOMPtr<nsIPropertyBag2> infoService = do_GetService("@mozilla.org/system-info;1");
|
||||
NS_ASSERTION(infoService, "Could not find a system info service");
|
||||
|
||||
|
@ -162,6 +162,7 @@ nsSystemInfo::Init()
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("device"), NS_LITERAL_CSTRING("Nokia N900"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("manufacturer"), NS_LITERAL_CSTRING("Nokia"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("hardware"), NS_LITERAL_CSTRING("RX-51"));
|
||||
SetPropertyAsBool(NS_LITERAL_STRING("tablet"), false);
|
||||
break;
|
||||
} else if (strstr(line, "RX-44") ||
|
||||
strstr(line, "RX-48") ||
|
||||
@ -170,6 +171,19 @@ nsSystemInfo::Init()
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("device"), NS_LITERAL_CSTRING("Nokia N8xx"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("manufacturer"), NS_LITERAL_CSTRING("Nokia"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("hardware"), NS_LITERAL_CSTRING("N8xx"));
|
||||
SetPropertyAsBool(NS_LITERAL_STRING("tablet"), false);
|
||||
break;
|
||||
} else if (strstr(line, "RM-680")) {
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("device"), NS_LITERAL_CSTRING("Nokia N950"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("manufacturer"), NS_LITERAL_CSTRING("Nokia"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("hardware"), NS_LITERAL_CSTRING("N9xx"));
|
||||
SetPropertyAsBool(NS_LITERAL_STRING("tablet"), false);
|
||||
break;
|
||||
} else if (strstr(line, "RM-696")) {
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("device"), NS_LITERAL_CSTRING("Nokia N9"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("manufacturer"), NS_LITERAL_CSTRING("Nokia"));
|
||||
SetPropertyAsACString(NS_LITERAL_STRING("hardware"), NS_LITERAL_CSTRING("N9xx"));
|
||||
SetPropertyAsBool(NS_LITERAL_STRING("tablet"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user