Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tangled
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eriksson monteiro
tangled
Commits
722e7918
Commit
722e7918
authored
Feb 23, 2021
by
Eriksson Monteiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update user agent
parent
9eec6a0f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
chrome/browser/chrome_content_browser_client_unittest.cc
chrome/browser/chrome_content_browser_client_unittest.cc
+1
-1
chrome/browser/sessions/tab_restore_service_unittest.cc
chrome/browser/sessions/tab_restore_service_unittest.cc
+1
-1
components/version_info/version_info.cc
components/version_info/version_info.cc
+1
-1
content/common/user_agent.cc
content/common/user_agent.cc
+5
-2
No files found.
chrome/browser/chrome_content_browser_client_unittest.cc
View file @
722e7918
...
...
@@ -242,7 +242,7 @@ void CheckUserAgentStringOrdering(bool mobile_device) {
EXPECT_EQ
(
webkit_version_str
,
safari_version_str
);
EXPECT_TRUE
(
base
::
StartsWith
(
product_str
,
"
Tangled
/"
,
base
::
CompareCase
::
SENSITIVE
));
base
::
StartsWith
(
product_str
,
"
Chromium
/"
,
base
::
CompareCase
::
SENSITIVE
));
if
(
mobile_device
)
{
// "Mobile" gets tacked on to the end for mobile devices, like phones.
EXPECT_TRUE
(
...
...
chrome/browser/sessions/tab_restore_service_unittest.cc
View file @
722e7918
...
...
@@ -82,7 +82,7 @@ class TabRestoreServiceImplTest : public ChromeRenderViewHostTestHarness {
url3_
(
"http://3"
),
user_agent_override_
(
blink
::
UserAgentOverride
::
UserAgentOnly
(
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19"
" (KHTML, like Gecko) Tangled/18.0.1025.45 Safari/535.19"
)),
" (KHTML, like Gecko)
Chromium/18.0.1025.45
Tangled/18.0.1025.45 Safari/535.19"
)),
time_factory_
(
nullptr
),
window_id_
(
SessionID
::
FromSerializedValue
(
1
)),
tab_id_
(
SessionID
::
FromSerializedValue
(
2
))
{
...
...
components/version_info/version_info.cc
View file @
722e7918
...
...
@@ -18,7 +18,7 @@
namespace
version_info
{
std
::
string
GetProductNameAndVersionForUserAgent
()
{
return
"
Tangled
/"
+
GetVersionNumber
();
return
"
Chrome
/"
+
GetVersionNumber
();
}
std
::
string
GetProductName
()
{
...
...
content/common/user_agent.cc
View file @
722e7918
...
...
@@ -296,15 +296,18 @@ std::string BuildUserAgentFromOSAndProduct(const std::string& os_info,
// This is done to expose our product name in a manner that is maximally
// compatible with Safari, we hope!!
std
::
string
user_agent
;
std
::
string
tangled
=
product
;
base
::
ReplaceFirstSubstringAfterOffset
(
&
tangled
,
0
,
"Chrome"
,
"Tangled"
);
base
::
StringAppendF
(
&
user_agent
,
"Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d"
,
"Mozilla/5.0 (%s) AppleWebKit/%d.%d (KHTML, like Gecko) %s Safari/%d.%d
%s
"
,
os_info
.
c_str
(),
WEBKIT_VERSION_MAJOR
,
WEBKIT_VERSION_MINOR
,
product
.
c_str
(),
WEBKIT_VERSION_MAJOR
,
WEBKIT_VERSION_MINOR
);
WEBKIT_VERSION_MINOR
,
tangled
.
c_str
());
return
user_agent
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment