mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 06:18:38 +09:00
parent
b586913598
commit
2531de02eb
85 changed files with 68 additions and 1357 deletions
|
|
@ -848,31 +848,6 @@ nsHttpHandler::InitUserAgentComponents()
|
|||
}
|
||||
#endif // MOZ_MULET
|
||||
|
||||
#if defined(MOZ_WIDGET_GONK)
|
||||
// Device model identifier should be a simple token, which can be composed
|
||||
// of letters, numbers, hyphen ("-") and dot (".").
|
||||
// Any other characters means the identifier is invalid and ignored.
|
||||
nsCString deviceId;
|
||||
rv = Preferences::GetCString("general.useragent.device_id", &deviceId);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
bool valid = true;
|
||||
deviceId.Trim(" ", true, true);
|
||||
for (size_t i = 0; i < deviceId.Length(); i++) {
|
||||
char c = deviceId.CharAt(i);
|
||||
if (!(isalnum(c) || c == '-' || c == '.')) {
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (valid) {
|
||||
mDeviceModelId = deviceId;
|
||||
} else {
|
||||
LOG(("nsHttpHandler: Ignore invalid device ID: [%s]\n",
|
||||
deviceId.get()));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef MOZ_UA_OS_AGNOSTIC
|
||||
// Gather OS/CPU.
|
||||
#if defined(XP_WIN)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue