Skip to content
Snippets Groups Projects
Commit 98f9df6c authored by Oleg Romashin's avatar Oleg Romashin
Browse files

Bug 756384 - Maemo/Meego builds should have the "Mobile" token in the UA string. r=mfinkle

parent 2b843cad
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment