Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tommy Webb
Tor Browser
Commits
98f9df6c
Commit
98f9df6c
authored
12 years ago
by
Oleg Romashin
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
netwerk/protocol/http/nsHttpHandler.cpp
+2
-2
2 additions, 2 deletions
netwerk/protocol/http/nsHttpHandler.cpp
xpcom/base/nsSystemInfo.cpp
+14
-0
14 additions, 0 deletions
xpcom/base/nsSystemInfo.cpp
with
16 additions
and
2 deletions
netwerk/protocol/http/nsHttpHandler.cpp
+
2
−
2
View file @
98f9df6c
...
...
@@ -654,7 +654,7 @@ nsHttpHandler::BuildUserAgent()
mUserAgent
+=
mPlatform
;
mUserAgent
.
AppendLiteral
(
"; "
);
#endif
#ifdef
ANDROID
#if
def
ined(
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"
);
...
...
This diff is collapsed.
Click to expand it.
xpcom/base/nsSystemInfo.cpp
+
14
−
0
View file @
98f9df6c
...
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment