summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/protocol/http')
-rw-r--r--netwerk/protocol/http/nsHttpHandler.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
index e1b7c9bff..32e50712f 100644
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -783,49 +783,6 @@ nsHttpHandler::InitUserAgentComponents()
#endif
-#ifdef ANDROID
- nsCOMPtr<nsIPropertyBag2> infoService = do_GetService("@mozilla.org/system-info;1");
- MOZ_ASSERT(infoService, "Could not find a system info service");
- nsresult rv;
- // Add the Android version number to the Fennec platform identifier.
-#if defined MOZ_WIDGET_ANDROID
-#ifndef MOZ_UA_OS_AGNOSTIC // Don't add anything to mPlatform since it's empty.
- nsAutoString androidVersion;
- rv = infoService->GetPropertyAsAString(
- NS_LITERAL_STRING("release_version"), androidVersion);
- if (NS_SUCCEEDED(rv)) {
- mPlatform += " ";
- // If the 2nd character is a ".", we know the major version is a single
- // digit. If we're running on a version below 4 we pretend to be on
- // Android KitKat (4.4) to work around scripts sniffing for low versions.
- if (androidVersion[1] == 46 && androidVersion[0] < 52) {
- mPlatform += "4.4";
- } else {
- mPlatform += NS_LossyConvertUTF16toASCII(androidVersion);
- }
- }
-#endif
-#endif
- // Add the `Mobile` or `Tablet` or `TV` token when running on device.
- bool isTablet;
- rv = infoService->GetPropertyAsBool(NS_LITERAL_STRING("tablet"), &isTablet);
- if (NS_SUCCEEDED(rv) && isTablet) {
- mCompatDevice.AssignLiteral("Tablet");
- } else {
- bool isTV;
- rv = infoService->GetPropertyAsBool(NS_LITERAL_STRING("tv"), &isTV);
- if (NS_SUCCEEDED(rv) && isTV) {
- mCompatDevice.AssignLiteral("TV");
- } else {
- mCompatDevice.AssignLiteral("Mobile");
- }
- }
-
- if (Preferences::GetBool(UA_PREF("use_device"), false)) {
- mDeviceModelId = mozilla::net::GetDeviceModelId();
- }
-#endif // ANDROID
-
#ifdef MOZ_MULET
{
// Add the `Mobile` or `Tablet` or `TV` token when running in the b2g
@@ -1005,18 +962,6 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
mUserAgentIsDirty = true;
}
-#ifdef ANDROID
- // general.useragent.use_device
- if (PREF_CHANGED(UA_PREF("use_device"))) {
- if (Preferences::GetBool(UA_PREF("use_device"), false)) {
- mDeviceModelId = mozilla::net::GetDeviceModelId();
- } else {
- mDeviceModelId = EmptyCString();
- }
- mUserAgentIsDirty = true;
- }
-#endif
-
//
// HTTP options
//